답안 #835991

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
835991 2023-08-24T03:49:14 Z Nicolas125841 Plahte (COCI17_plahte) Java 11
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
 
using namespace std;

vector<bitset<80000>> sets(80000, bitset<80000>());
 
int main(){
    cin.tie(NULL)->sync_with_stdio(false);
 
    int n, m;
 
    for(int i = 0; i < n; i++){
        int lx, ly, ux, uy;
        cin >> lx >> ly >> ux >> uy;
    }
 
    set<int> colors;
 
    for(int i = 0; i < m; i++){
        int x, y, c;
        cin >> x >> y >> c;
 
        assert(colors.find(c) == colors.end());
 
        colors.insert(c);
 
        cout << "0\n";
    }
}

Compilation message

plahte.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
plahte.java:1: error: class, interface, or enum expected
#include <bits/stdc++.h>
         ^
plahte.java:5: error: class, interface, or enum expected
vector<bitset<80000>> sets(80000, bitset<80000>());
^
plahte.java:7: error: class, interface, or enum expected
int main(){
^
plahte.java:10: error: class, interface, or enum expected
    int n, m;
    ^
plahte.java:12: error: class, interface, or enum expected
    for(int i = 0; i < n; i++){
    ^
plahte.java:12: error: class, interface, or enum expected
    for(int i = 0; i < n; i++){
                   ^
plahte.java:12: error: class, interface, or enum expected
    for(int i = 0; i < n; i++){
                          ^
plahte.java:14: error: class, interface, or enum expected
        cin >> lx >> ly >> ux >> uy;
        ^
plahte.java:15: error: class, interface, or enum expected
    }
    ^
plahte.java:19: error: class, interface, or enum expected
    for(int i = 0; i < m; i++){
    ^
plahte.java:19: error: class, interface, or enum expected
    for(int i = 0; i < m; i++){
                   ^
plahte.java:19: error: class, interface, or enum expected
    for(int i = 0; i < m; i++){
                          ^
plahte.java:21: error: class, interface, or enum expected
        cin >> x >> y >> c;
        ^
plahte.java:23: error: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier
        assert(colors.find(c) == colors.end());
        ^
plahte.java:25: error: class, interface, or enum expected
        colors.insert(c);
        ^
plahte.java:27: error: class, interface, or enum expected
        cout << "0\n";
        ^
plahte.java:28: error: class, interface, or enum expected
    }
    ^
18 errors