답안 #1063594

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1063594 2024-08-17T21:03:23 Z beaconmc Brought Down the Grading Server? (CEOI23_balance) C++14
0 / 100
201 ms 19932 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){
			cout << b << " "<< a << "\n";
			sus[b]++;
			sus2[a]++;
		}else{
			cout << a << " " << b << "\n";
			sus[a]++;
			sus2[b]++;
		}
	}





}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Correct
2 Incorrect 0 ms 348 KB Unexpected end of file - int32 expected
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Correct
2 Incorrect 0 ms 348 KB maximum and minimum number of simultaneously evaluated submissions for any single task differ more than one
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 201 ms 19932 KB maximum and minimum number of simultaneously evaluated submissions for any single task differ more than one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 201 ms 19932 KB maximum and minimum number of simultaneously evaluated submissions for any single task differ more than one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Correct
2 Incorrect 0 ms 348 KB maximum and minimum number of simultaneously evaluated submissions for any single task differ more than one
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 201 ms 19932 KB maximum and minimum number of simultaneously evaluated submissions for any single task differ more than one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 201 ms 19932 KB maximum and minimum number of simultaneously evaluated submissions for any single task differ more than one
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Correct
2 Incorrect 0 ms 348 KB Unexpected end of file - int32 expected
3 Halted 0 ms 0 KB -