답안 #499402

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
499402 2021-12-28T11:09:04 Z Alisaf9 Ljeto (COCI21_ljeto) C++14
0 / 50
1 ms 204 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,q,f=0,s=0,w,e;
    cin>>n;
    int a[100000];

    pair<int,int>pp[1009];
    for(int i=0;i<n;i++)
    {
        cin>>pp[i].second>>pp[i].first>>q;

    }
    for(int i=0;i<n;i++)
    {
        if(pp[i].first<5)
            f+=100;
        else
            s+=100;
        if(pp[i].first==pp[i-1].first)
        {
            if(pp[i].second-pp[i-1].second<=10)
            {
                if(pp[i].first<5)
            f+=50;
            }
            else
                s+=50;

        }
    }
    cout<<f<<" "<<s;
    return 0;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:7:21: warning: unused variable 'w' [-Wunused-variable]
    7 |     int n,q,f=0,s=0,w,e;
      |                     ^
Main.cpp:7:23: warning: unused variable 'e' [-Wunused-variable]
    7 |     int n,q,f=0,s=0,w,e;
      |                       ^
Main.cpp:9:9: warning: unused variable 'a' [-Wunused-variable]
    9 |     int a[100000];
      |         ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -