Submission #974264

# Submission time Handle Problem Language Result Execution time Memory
974264 2024-05-03T07:01:20 Z vjudge1 Ljeto (COCI21_ljeto) C++17
25 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#define fi first
#define se second
const int MOD = 1e9+7;
#define pin pair<int,int>
#define lup(i,x) for(int i=0; i<x; i++)
#define pb push_back
#define pu push
#define vint vector<int>
#define nitro ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define din(x) int x;cin>>x;
#define endl '\n'
#define cout std::cout
vector<pair<int,pair<int,int>>> p;
signed main(){
    int n;
    cin >> n;
    int elang = 0;
    int bebek = 0;
    while(n--){
        int t,a,b;
        cin >> t >> a >> b;
        for(auto n : p){
            if(n.se.fi == a && n.fi<t &&  t-n.fi <= 10 && t-n.fi>=0){
                if(a<=4) elang+=50;
                else bebek+=50;
            }
        }
        p.pb({t,{a,b}});
        if(a<=4) elang+=100;
        else bebek+=100;
    }
    cout << elang << " " << bebek << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 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 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 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Incorrect 0 ms 348 KB Output isn't correct
12 Halted 0 ms 0 KB -