Submission #1064191

# Submission time Handle Problem Language Result Execution time Memory
1064191 2024-08-18T10:11:07 Z beaconmc Brought Down the Grading Server? (CEOI23_balance) C++14
0 / 100
224 ms 18684 KB
#include <bits/stdc++.h>
 
typedef long long ll;
#define FOR(i,x,y) for(ll i=x; i<y; i++)
#define FORNEG(i,x,y) for(ll i=x; i>y; i--)
 
using namespace std;


map<ll,ll> sus;
map<ll,ll> sus2;
map<ll,ll> cnts;


int main(){

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	ll n,s,t;
	cin >> n >> s >> t;
	vector<vector<ll>> stuff;


	FOR(i,0,n){
		ll a,b;
		cin >> a >> b;

		cnts[a]++;
		cnts[b]++;
		stuff.push_back({a,b});
	}



	FOR(i,0,n){
		ll a = stuff[i][0], b = stuff[i][1];

		if (sus[a] == (cnts[a]+1)/2 || sus2[b] ==(cnts[b]+1)/2 || sus[a] >= sus2[a]){

			sus[b]++;
			sus2[a]++;
		}else{

			sus[a]++;
			sus2[b]++;
		}
	}
	// cout << "FUCK" << endl;

	// FOR(i,1,t+1){
	// 	cout << sus[i] << " " << sus2[i] << endl;
	// }





}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 600 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 224 ms 18684 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 224 ms 18684 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 224 ms 18684 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 224 ms 18684 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 600 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -