답안 #703471

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
703471 2023-02-27T13:10:38 Z Pacybwoah Ljeto (COCI21_ljeto) C++14
50 / 50
1 ms 340 KB
#include<iostream>
#include<vector>
#define ll long long
using namespace std;
int main(){
    int n;
    cin>>n;
    int t,a,b;
    vector<vector<int>> vec(9);
    for(int i=0;i<n;i++){
        cin>>t>>a>>b;
        vec[a].push_back(t);
    }
    int ans=0,bns=0;
    for(int i=1;i<=4;i++){
        if(vec[i].size()>0) ans+=100;
        for(int j=1;j<vec[i].size();j++){
            if(vec[i][j]-vec[i][j-1]<=10) ans+=150;
            else ans+=100;
        }
    }
    for(int i=5;i<=8;i++){
        if(vec[i].size()>0) bns+=100;
        for(int j=1;j<vec[i].size();j++){
            if(vec[i][j]-vec[i][j-1]<=10) bns+=150;
            else bns+=100;
        }
    }
    cout<<ans<<" "<<bns;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:17:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |         for(int j=1;j<vec[i].size();j++){
      |                     ~^~~~~~~~~~~~~~
Main.cpp:24:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         for(int j=1;j<vec[i].size();j++){
      |                     ~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 296 KB Output is correct
4 Correct 0 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 296 KB Output is correct
6 Correct 0 ms 300 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct