제출 #894153

#제출 시각아이디문제언어결과실행 시간메모리
894153ozner77Arranging Shoes (IOI19_shoes)C++17
컴파일 에러
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) } }

컴파일 시 표준 에러 (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);
      |         ~~~~~^~~~~~~~~