# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
874959 | creeped | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
ll n;
cin>>n;
ll a[n+1], b[n+1], t[n+1];
ll x[10],y[10];
for(ll i=1;i<=10;i++)
x[i] = y[i] = -10000;
ll ans1=0, ans2=0;
for(ll i=1;i<=n;i++)
{
cin>>t[i]>>a[i]>>b[i];
if(a[i] > 0 and a[i] < 5)
{
ans1 += 100;
if(t[i] - x[a[i]]<= 10)
ans1 += 50;
x[a[i]] = t[i];
}
else
{
ans2 += 100;
if(t[i] - y[a[i]] <= 10)
ans2 += 50;
y[a[i]] = t[i];
}
}
cout<<ans1<<" "<<ans2<<endl;
}
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
ll ttt=1;
//cin>>ttt;
while(ttt--)
{
solve();
}
}
컴파일 시 표준 에러 (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... |