Submission #974271

# Submission time Handle Problem Language Result Execution time Memory
974271 2024-05-03T07:10:48 Z vjudge1 Ljeto (COCI21_ljeto) C++17
15 / 50
0 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define pii pair<int,int>
#define int long long
#define nah_id_win ios_base::sync_with_stdio(0); cin.tie(0)

signed main(){
	nah_id_win;
	int n; cin >> n;
	vector<pair<int, pair<int, int>>> a(n); //{time, {a, b}}
	
	for (int i = 0; i < n; i++){
		cin >> a[i].fi >> a[i].se.fi >> a[i].se.se;
	}

	
	sort(all(a));
		
	int elang = 0, bebek = 0;
	for (int i = 0; i < n; i++){
		int t = a[i].fi;
		int lempar = a[i].se.fi, kena = a[i].se.se;
		
		if (lempar <= 4) elang += 100;
		else if (lempar >= 5) bebek += 100;
		
		if (i >= 1){
			if (lempar == a[i-1].se.fi && t < a[i-1].fi + 10){
				//cout << "wlee\n";
				if (lempar <= 4) elang += 50;
				else if (lempar >= 5) bebek += 50;
			}
			
		}
	}
	
	cout << elang << " " << bebek << "\n";	
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:26:28: warning: unused variable 'kena' [-Wunused-variable]
   26 |   int lempar = a[i].se.fi, kena = a[i].se.se;
      |                            ^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -