Submission #499428

# Submission time Handle Problem Language Result Execution time Memory
499428 2021-12-28T11:49:07 Z Rande Ljeto (COCI21_ljeto) C++14
10 / 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(b<5 && y<5 && abs(x-a)<=10){
      ans1 += 150;
    }
    else if(b<5 && y<5 && abs(x-a)>10){
      ans1 += 100;
    }
    else if(b>4 && y>4 && abs(x-a)<=10){
      ans2 += 150;
    }
    else if(b>4 && 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;
  
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -