제출 #533498

#제출 시각아이디문제언어결과실행 시간메모리
533498andecaandeciArranging Shoes (IOI19_shoes)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
 
typedef int ll;
typedef double db;
#define pairll pair<ll,ll>
#define lpairll pair<ll,pairll>
 
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define repp(i,a,b) for(ll i = (a); i <= (b); i++)
#define repm(i, a, b) for (ll i = (a); i >= (b); i--)
#define repz(i, a, b) for (ll i = (a); i < (b); i++)
 
const long long MOD = 1e9+7, N = 5e3 + 5, M = 1e3+5, INF = 1e9; 

ll tc = 1, n, m,k,ar[N];
string s, ye = "YES", no = "NO", nu;
bool ex[N];

void fastt(){  
  ios_base::sync_with_stdio(0); 
  cin.tie(NULL);
  cout.tie(NULL); 
}

void input(){
  cin >> n;
  repp(i,1,n){
    cin >> ar[i];
  }
} 

void solve(){
  cout << (ar[1] < 0) << endl;
}

int main(){
  // freopen("input.txt", "r", stdin);
  // freopen("output.txt", "w", stdout);
  fastt();
  while(tc--){
    input();
    solve();
  }
}

/*
3
1 2 3

1 2 3

5
2 8 6 3 1
1 2 3 6 8

(n-1)/2

*/

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

/usr/bin/ld: /tmp/ccr0YgOj.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccpdW7Hk.o:shoes.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccr0YgOj.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