제출 #396424

#제출 시각아이디문제언어결과실행 시간메모리
396424BlondieAliens (IOI16_aliens)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef long double ld; #define F first #define S second const int MOD = 1e9 + 7;//XXX const int C = 26;//XXX void add(int &x, int y){ x += y; while (x >= MOD) x -= MOD; while (x < 0) x += MOD; } int fix(int x){ while (x >= MOD) x -= MOD; while (x < 0) x += MOD; return x; } int pw(int a, int b){ int ret = 1; while (b){ if (b & 1) ret = 1ll*ret*a%MOD; b >>= 1; a = 1ll*a*a%MOD; } return ret; } const int MAXN = 1e2 + 10; int n, m, k; int a[MAXN][MAXN]; void solve() { cin >> n >> m >> k; assert(n <= 50 && m <= 100 && k == n); for(int i = 0; i < n; i++) { int r, c; cin >> r >> c; if(r > c) swap(r, c); int len = c-r+1; for(int row = r; row < r+len; row++) { for(int col = r; col < r+len; col++) { a[row][col] = 1; } } } int answer = 0; for(int i = 0; i < m; i++) { for(int j = 0; j < m; j++) { cerr << a[i][j] << " "; answer += a[i][j]; } cerr << "\n"; } cout << answer << "\n"; } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); //cout << fixed << setprecision(6); int te = 1; //cin >> te; for (int w = 1; w <= te; w++){ //cout << "Case #" << w << ": "; solve(); } return 0; }

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

/tmp/ccyej8p3.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccLCnoMG.o:aliens.cpp:(.text.startup+0x0): first defined here
/tmp/ccyej8p3.o: In function `main':
grader.cpp:(.text.startup+0xf0): undefined reference to `take_photos(int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status