Submission #894155

#TimeUsernameProblemLanguageResultExecution timeMemory
894155ozner77Arranging Shoes (IOI19_shoes)C++17
Compilation error
0 ms0 KiB
#include <iostream> #include <vector> using namespace std; int a,b,c; vector<int> V; int main() { scanf("%d",&a); for(int i=0;i<a*2;i++){ scanf("%d",&b); V.append(b); } if(V[0]<0){ printf("%d",0); }else{ printf("%d",1); } }

Compilation message (stderr)

shoes.cpp: In function 'int main()':
shoes.cpp:11:11: error: 'class std::vector<int>' has no member named 'append'
   11 |         V.append(b);
      |           ^~~~~~
shoes.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |     scanf("%d",&a);
      |     ~~~~~^~~~~~~~~
shoes.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |         scanf("%d",&b);
      |         ~~~~~^~~~~~~~~