Submission #469394

# Submission time Handle Problem Language Result Execution time Memory
469394 2021-08-31T19:09:48 Z wonsei 최댓값 (tutorial2) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
int main() {
 	int n; cin >> n;
  	int ans = -1;
  	while(n--) {
      int x; cin >> x;
      ans = max(ans, x);
    }
  	cout << ans << "\n";
}

Compilation message

/usr/bin/ld: /tmp/ccp6by4J.o: in function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccMxFQvL.o:grader.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccMxFQvL.o: in function `main':
grader.cpp:(.text.startup+0xaa): undefined reference to `GetMax(int, int*)'
collect2: error: ld returned 1 exit status