제출 #1296810

#제출 시각아이디문제언어결과실행 시간메모리
1296810lmaobruhLjeto (COCI21_ljeto)C++20
50 / 50
1 ms584 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define eb emplace_back
#define pb push_back
#define fi first
#define se second
#define ii pair<int,int>
#define ve vector
#define all(x) x.begin(), x.end()
#define fo(i,a,b) for (int i=(a); i<=(b); ++i)
#define fd(i,a,b) for (int i=(a); i>=(b); --i)
#define maxi(a, b) a = max(a, b)
#define mini(a, b) a = min(a, b)
#define siz(x) ((int)(x).size())
#define vi ve<int>
#define _ << ' ' <<

const int N = 1e6+5, inf = 1e9+10, mod = 1e9+7;

bool MBE;

/**

**/

int n, last[10];

void sol() {
    cin >> n;
    memset(last,-0x3f,sizeof(last));
    int r1=0, r2=0;
    fo(i,1,n) {
        int t, a, b; cin >> t >> a >> b;
        if (a<=4) {
            r1+=100;
            if (t-last[a]<=10) r1+=50;
            last[a] = t;
        } else {
            r2+=100;
            if (t-last[a]<=10) r2+=50;
            last[a]=t;
        }
    }
    cout << r1 _ r2;
}

bool MED;

signed main(){
    ios::sync_with_stdio(0); cin.tie(0);
    if(fopen("A.inp","r")) {
        freopen("A.inp","r",stdin);
        freopen("A.out","w",stdout);
    }
    int tc = 1; // cin >> tc;
    fo(i,1,tc) sol();
//    cerr << "Memory = " << abs(&MED - &MBE)/1024.0/1024.0 << " MB";
    return 0;
}

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

Main.cpp: In function 'int main()':
Main.cpp:53:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   53 |         freopen("A.inp","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~
Main.cpp:54:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   54 |         freopen("A.out","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...