/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:14:2: error: 'cin' was not declared in this scope
  cin>>n>>k;
  ^~~
foo.cc:14:2: note: suggested alternative: 'main'
  cin>>n>>k;
  ^~~
  main
foo.cc:15:26: error: 'scanf' was not declared in this scope
  for (int i=1;i<=10;i++) scanf("%d",&e[i]);
                          ^~~~~
foo.cc:16:25: error: 'scanf' was not declared in this scope
  for (int i=1;i<=n;i++) scanf("%d",&p[i].w),p[i].d=i;
                         ^~~~~
foo.cc:17:2: error: 'sort' was not declared in this scope
  sort(p+1,p+n+1,cmp);
  ^~~~
foo.cc:17:2: note: suggested alternative: 'short'
  sort(p+1,p+n+1,cmp);
  ^~~~
  short
foo.cc:20:25: error: 'printf' was not declared in this scope
  for (int i=1;i<=k;i++) printf("%d ",p[i].d);
                         ^~~~~~
foo.cc:20:25: note: suggested alternative: 'int'
  for (int i=1;i<=k;i++) printf("%d ",p[i].d);
                         ^~~~~~
                         int
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1282 佳佳的魔法照片
语言
C++
递交时间
2021-11-17 12:52:53
评测时间
2021-11-17 12:52:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes