제출 #1219899

#제출 시각아이디문제언어결과실행 시간메모리
1219899islam_2010Arranging Shoes (IOI19_shoes)C++20
컴파일 에러
0 ms0 KiB
#include "shoes.h" #include <bits/stdc++.h> using namespace std; long long count_swaps(vector<int> s){ int n = s.size(); vector<pair<int, int>> v; int c = 0; for(int i = 0; i < n/2; i++){ for(int j = n/2 ; j < n; j++){ if(abs(s[i])==abs(s[j])){ c += (j-i-1); break; } } }return c; } signed main(){ int n; cin >> n; vector<int> v(n*2); for(int i = 0; i < 2*n; i++){ cin >> v[i]; }cout << count_swaps(v); }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccFEL26S.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccFXuf2o.o:shoes.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status