当前位置:网站首页>~2 CCF 2022-03-1 uninitialized warning
~2 CCF 2022-03-1 uninitialized warning
2022-07-25 09:54:00 【Ye Xiaobai】
Warning not initialized
Title Description

Input

Output

The sample input
10 7
1 2
3 3
3 0
3 3
6 2
2 1
8 2
Sample output
3
Source code
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n , k ;
cin >> n >> k;
int res=0;
int temp1=0;
int temp2=0;
double *arr=new double [n];
for (int i = 0; i <n ; i++) {
arr[i]= 0;
}
arr[0]= 1;
for (int i = 0; i < k; i++) {
cin>>temp1>>temp2;
if (!arr[temp2]){
res++;
arr[temp1]= 1;
} else{
arr[temp1]= 1;
}
}
cout<<res<<endl;
delete []arr;
return 0;
}
The subtasks

About this problem
use bool Array Some data fail , So replace it in the back double It's shaped
边栏推荐
- [dimension reduction strike] Hilbert curve
- 深度估计自监督模型monodepth2论文总结和源码分析【理论部分】
- First knowledge of opencv4.x --- box filtering
- Preliminary understanding and implementation of wechat applet bottom navigation bar
- Minkowskiengine installation
- 初识Opencv4.X----为图像添加椒盐噪声
- First knowledge of opencv4.x --- image template matching
- ~1 CCF 2022-06-2 treasure hunt! Big adventure!
- FPGA基础进阶
- 目标检测与分割之MaskRCNN代码结构流程全面梳理+总结
猜你喜欢

初识Opencv4.X----为图像添加高斯噪声

Get to know opencv4.x for the first time --- add Gaussian noise to the image

【深度学习】自编码器

Development history of convolutional neural network (part)
![[dimension reduction strike] Hilbert curve](/img/bb/c2488f29721bdc413d709ee4bfaddf.png)
[dimension reduction strike] Hilbert curve

FPGA基础进阶

First knowledge of opencv4.x --- image histogram drawing

深度估计自监督模型monodepth2在自己数据集的实战——单卡/多卡训练、推理、Onnx转换和量化指标评估

深入理解pytorch分布式并行处理工具DDP——从工程实战中的bug说起

Kotlin basic knowledge points
随机推荐
TensorFlow2 安装快速避坑汇总
数据分析面试记录1-5
MLX90640 红外热成像仪测温模块开发笔记(四)
ARMV8体系结构简介
MLX90640 红外热成像仪测温模块开发笔记(一)
【数据挖掘】最近邻和贝叶斯分类器
T5论文总结
ARMv8通用定时器简介
手持振弦VH501TC采集仪传感器的连接与数据读取
多通道振弦、温度、模拟传感信号采集仪数据查看和参数修改
MinkowskiEngine 安装
从鱼眼到环视到多任务王炸——盘点Valeo视觉深度估计经典文章(从FisheyeDistanceNet到OmniDet)(上)
AMD EPYC 9664旗舰规格曝光:96核192线程 480MB缓存 3.8GHz频率
Kotlin realizes file download
无向连通图邻接表的创建输出广度深度遍历
UI prototype resources
SD/SDIO/EMMC
Temperature, humidity and light intensity acquisition based on smart cloud platform
First acquaintance with opencv4.x --- ROI interception
【深度学习模型部署】使用TensorFlow Serving + Tornado部署深度学习模型