제출 #499406

#제출 시각아이디문제언어결과실행 시간메모리
499406Alisaf9Ljeto (COCI21_ljeto)C++14
0 / 50
0 ms204 KiB
#include <bits/stdc++.h>

using namespace std;

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


    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;
            for(int l=0;l<i;l++)
            {


        if(pp[i].first==pp[l].first)
        {
            if(pp[i].second-pp[l].second<=10)
            {
                if(pp[i].first<5)
            f+=50;
            }
            else
                s+=50;
        }
        }
    }
    cout<<f<<" "<<s;
    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:21:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   21 |         else
      |         ^~~~
Main.cpp:23:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   23 |             for(int l=0;l<i;l++)
      |             ^~~
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;
      |                       ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...