| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 674654 | vjudge1 | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize ("Ofast")
#define F first
#define S second
#define vi vector<int>
#define vvi vector<vi>
#define pi pair<int, int>
#define vpi vector<pi>
#define vb vector<bool>
#define vvb vector<vb>
#define pb push_back
#define ppb pop_back
#define read(a) for(auto &x:a) cin >> x;
#define print(a) for(auto x:a) cout << x << " "; cout << "\n";
#define vc vector<char>
#define vvc vector<vc>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define int long long
#define ld long double
const int INF = 4e18;
void solve(){
int n; cin >> n;
vvi v(8);
int ans1 = 0, ans2 = 0;
for(int i=0; i<n; i++){
int t, a, b; cin >> t >> a >> b;
v[a-1].pb(t);
}
for(int i=0; i<4; i++){
sort(all(v[i]));
for(int j=0; j<v[i].size(); j++){
if(j > 0 && v[i][j]-v[i][j-1] <= 10) ans1 += 150;
else ans1 += 100;
}
}
for(int i=4; i<8; i++){
sort(all(v[i]));
for(int j=0; j<v[i].size(); j++){
if(j > 0 && v[i][j]-v[i][j-1] <= 10) ans2 += 150;
else ans2 += 100;
}
}
cout << ans1 << " " << ans2 << "\n";
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
// #ifndef ONLINE_JUDGE
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
// #endif
int tt = 1;
// cin >> tt;
while(tt--)
solve();
return 0;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
