Submission #1218295

#TimeUsernameProblemLanguageResultExecution timeMemory
1218295ProtonDecay314Hieroglyphs (IOI24_hieroglyphs)C++20
Compilation error
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; }

Compilation message (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();
      |              ^~~~