제출 #894157

#제출 시각아이디문제언어결과실행 시간메모리
894157ozner77Arranging 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.push_back(b);
    }
    if(V[0]<0){
        printf("%d",0);
    }else{
        printf("%d",1);
    }
}

컴파일 시 표준 에러 (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/ccbNQfqd.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccWQA3Fd.o:shoes.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccbNQfqd.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