Submission #431430

#TimeUsernameProblemLanguageResultExecution timeMemory
431430Bench0310Seats (IOI18_seats)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "seats.h" using namespace std; typedef long long ll; int n,h,w; vector<array<int,2>> v; void give_initial_chart(int nh,int nw,vector<int> r,vector<int> c) { h=nh; w=nw; n=h*w; for(int i=0;i<n;i++) v[i]={r[i],c[i]}; } int swap_seats(int a,int b) { swap(v[a],v[b]); int ar=v[0][0]; int br=v[0][0]; int ac=v[0][1]; int bc=v[0][1]; int res=0; for(int i=0;i<n;i++) { ar=min(ar,v[i][0]); br=max(br,v[i][0]); ac=min(ac,v[i][1]); bc=max(bc,v[i][1]); res+=((br-ar+1)*(bc-ac+1)==i+1); } return res; } int main() { return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccOJV2CT.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccRyVD8R.o:seats.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status