제출 #1218295

#제출 시각아이디문제언어결과실행 시간메모리
1218295ProtonDecay314Hieroglyphs (IOI24_hieroglyphs)C++20
컴파일 에러
0 ms0 KiB
#include "hieroglyphs.h" #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; #define pb push_back bool eq(vi a, vi b) { int as = a.size, bs = b.size(); if(as != bs) return false; for(int i = 0; i < as; i++) { if(a[i]!=b[i]) return false; } return true; } vi ucs(vi a, vi b) { if(eq(a, b)) return a; vi empty; empty.pb(-1); return empty; }

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

hieroglyphs.cpp: In function 'bool eq(vi, vi)':
hieroglyphs.cpp:8:14: error: cannot convert 'std::vector<int>::size' from type 'std::vector<int>::size_type (std::vector<int>::)() const noexcept' {aka 'long unsigned int (std::vector<int>::)() const noexcept'} to type 'int'
    8 |   int as = a.size, bs = b.size();
      |              ^~~~