Submission #894166

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

Compilation message (stderr)

shoes.cpp: In function 'int main()':
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);
      |         ~~~~~^~~~~~~~~
/usr/bin/ld: /tmp/ccl4ml1v.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cctPWSOt.o:shoes.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccl4ml1v.o: in function `main':
grader.cpp:(.text.startup+0x2a8): undefined reference to `count_swaps(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status