답안 #592791

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
592791 2022-07-09T15:44:05 Z NotLinux Ljeto (COCI21_ljeto) C++14
50 / 50
1 ms 332 KB
/*  character : NotLinux
    stats : 
    - Skill : 2/10
    - Passion : 8/10
    - Rating : ~1400/3000 
    - Biggest Dream : being actually good at cp
    - Methods : Studying
    - Extras : No math or coding background
    - Started at : October of 2021  */
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mp make_pair
#ifdef LOCAL
    #include "/home/notlinux/debug.h"
#else
    #define debug(x...) void(37)
    #define showarr(x) void(37)
#endif
int func(vector < int > arr){
    int ans = arr.size() * 100;
    int sz = arr.size();
    for(int i = 1;i<sz;i++){
        if(arr[i] - arr[i-1] <= 10){
            ans += 50;
        }
    }
    return ans;
}

int32_t main(){
    ios_base::sync_with_stdio(0);cin.tie(nullptr);
    //int tt;cin>>tt;while(tt--)solve();
    int n;cin >> n;
    vector < vector < int >  > player(9);  
    int t1,t2;
    t1 = t2 = 0;
    while(n--){
        int t,a,b;cin >> t >> a >> b;
        player[a].push_back(t);
    }
    for(int i = 1;i<=8;i++)sort(player[i].begin(),player[i].end());
    for(int i = 1;i<=4;i++){
        t1 += func(player[i]);
        t2 += func(player[i+4]);
    }
    cout << t1 << " " << t2 << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 324 KB Output is correct
4 Correct 0 ms 328 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 324 KB Output is correct
6 Correct 0 ms 328 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 320 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 320 KB Output is correct