제출 #1288569

#제출 시각아이디문제언어결과실행 시간메모리
1288569mosnter777Ljeto (COCI21_ljeto)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
int main(){
    long long n;
    cin>>n;
    vector<long long>t(n),a(n),b(n);
    long long adicto=0;
    long long ananas=0;
    for (long long i = 0; i<n;i++) {
        cin>>t[i]>>a[i]>>b[i];
    vector<long lon}g l(10, -1000);
    for (long long i=0;i<n;i++) {
        long long k=t[i];
        long long s=a[i];
        long long tt=100;
        if (l[s]!=-1000 && k-l[s]<=10) {
            tt+=50;
        }
        l[s]=k;
        if (s>=1 && s<=4)
            ananas+=tt;
        else
            adicto+=tt;
    }
    cout<<adicto<<" "<<ananas;
    return 0;
}

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

Main.cpp: In function 'int main()':
Main.cpp:11:17: error: template argument 1 is invalid
   11 |     vector<long lon}g l(10, -1000);
      |                 ^~~
Main.cpp:11:17: error: template argument 2 is invalid
Main.cpp:11:20: error: expected unqualified-id before '}' token
   11 |     vector<long lon}g l(10, -1000);
      |                    ^
Main.cpp:11:21: error: 'g' was not declared in this scope
   11 |     vector<long lon}g l(10, -1000);
      |                     ^
Main.cpp:16:13: error: 'l' was not declared in this scope
   16 |         if (l[s]!=-1000 && k-l[s]<=10) {
      |             ^
Main.cpp:19:9: error: 'l' was not declared in this scope
   19 |         l[s]=k;
      |         ^