답안 #499426

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
499426 2021-12-28T11:44:10 Z Rande Ljeto (COCI21_ljeto) C++14
25 / 50
1 ms 204 KB
#include<bits/stdc++.h>
using namespace std;



int main(){
  int n;
  cin>>n;
  int a,b,c;
  cin>>a>>b>>c;
  long long ans1 = 0;
  long long ans2 = 0;
  if(b<5){
    ans1 = 100;
  }
  else{
    ans2 = 100;
  }
  for(int i=1 ; i<n ; i++){
    int x,y,z;
    cin>>x>>y>>z;
    if(y==b && y<5 && abs(x-a)<=10){
      ans1 += 150;
    }
    else if(y==b && y<5 && abs(x-a)>10){
      ans1 += 100;
    }
    else if(y==b && y>4 && abs(x-a)<=10){
      ans2 += 150;
    }
    else if(y==b && y>4 && abs(x-a)>10){
      ans2 += 100;
    }
    else if(y>4){
      ans2 += 100;
    }
    else if(y<5){
      ans1 += 100;
    }
    a = x;
    b = y;
    c = z;

  }
  cout << ans1 <<" " << ans2 << endl;

  return 0;
  
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Incorrect 0 ms 204 KB Output isn't correct
12 Halted 0 ms 0 KB -