Submission #894153

#TimeUsernameProblemLanguageResultExecution timeMemory
894153ozner77Arranging 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:14:23: error: expected ';' before '}' token
   14 |         printf("%d",0)
      |                       ^
      |                       ;
   15 |     }else{
      |     ~                  
shoes.cpp:16:23: error: expected ';' before '}' token
   16 |         printf("%d",1)
      |                       ^
      |                       ;
   17 |     }
      |     ~                  
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);
      |         ~~~~~^~~~~~~~~