/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:13:18: error: 'cout' was not declared in this scope
   if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
                  ^~~~
foo.cc:13:49: error: 'endl' was not declared in this scope
   if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
                                                 ^~~~
foo.cc:13:49: note: suggested alternative: 'enum'
   if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
                                                 ^~~~
                                                 enum
foo.cc:13:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
   ^~
foo.cc:13:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   if(b[j]>=a[i]) cout<<a[i]<<" "<<b[j]<<" "<<j<<endl;j--,ans++;
                                                      ^
foo.cc:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&n,&m);
  ~~~~~^~~~~~~~~~~~~~
foo.cc:7:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
                        ~~~~~^~~~~~~~~~~~
foo.cc:8:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=m;i++) scanf("%d",&b[i]);
                        ~~~~~^~~~~~~~~~~~

信息

递交者
类型
自测
题目
P1291 苹果摘陶陶
语言
C++
递交时间
2020-11-02 23:46:46
评测时间
2020-11-02 23:46:46
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes