Submission #1101124

#TimeUsernameProblemLanguageResultExecution timeMemory
1101124vjudge1Robots (IOI13_robots)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; #define vc vector #define vci vc<ll> #define vcs vc<string> #define pb push_back #define ins insert #define ii pair<ll,ll> #define str to_string #define fi first #define se second #define mii unordered_map<ll, ll> #define len (ll)size int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n; cin >> n; ll x, h; ll bef = INT_MIN, res = 0, px = INT_MAX; while(n--) { cin >> x >> h; if(x - h > bef) bef = x, res++; else if(x > bef) bef = x + h, res++; else if(x - h > px) bef = x; else bef = x + h; px = x; } cout << res << endl; return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc6X0AZf.o: in function `main':
robots.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccpjGCng.o:grader.c:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccpjGCng.o: in function `main':
grader.c:(.text.startup+0x1b1): undefined reference to `putaway'
collect2: error: ld returned 1 exit status