제출 #163033

#제출 시각아이디문제언어결과실행 시간메모리
163033rolypolyvg295보물 찾기 (CEOI13_treasure2)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; int calculate(int y, int x, vector<vector<int>>&count){ return count[y][x] - count[y+1][x] - count[y][x+1] + count[y+1][x+1]; } int main(){ int n; cin >> n; vector<vector<int>> count(n+2, vector<int>(n+2, 0)); for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++){ cout << i << ' ' << j << ' ' << n << ' ' << n << endl; cin >> count[i][j]; } cout << "END" << endl; for (int i = 1; i <= n; i++){ for (int j = 1; j <= n; j++) cout << calculate(i, j, count); cout << '\n'; } cout << endl; return 0; }

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

/tmp/cc68UBBQ.o: In function `main':
treasure.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccoIEtC6.o:grader.c:(.text.startup+0x0): first defined here
/tmp/ccoIEtC6.o: In function `main':
grader.c:(.text.startup+0x109): undefined reference to `findTreasure(int)'
collect2: error: ld returned 1 exit status