Submission #396426

#TimeUsernameProblemLanguageResultExecution timeMemory
396426BlondieAliens (IOI16_aliens)C++17
Compilation error
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"; } ll take_photos(int n, int m, int k, vector<int> r, vector<int> c) { ll answer = 0; return answer; } 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; }

Compilation message (stderr)

/tmp/ccy8NR4j.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccxTwEox.o:aliens.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status