Submission #421882

#TimeUsernameProblemLanguageResultExecution timeMemory
421882MetalPowerSequence (BOI14_sequence)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int MX = 1e5 + 10, num = 1e4; int K, arr[MX]; inline int check(int a, const int& b){ while(a){ if(a % 10 == b) return true; a /= 10; } return false; } inline void chmin(long long& a, long long b){ if(b < a) a = b; } bool vis[10]; int main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin >> K; for(int i = 0; i < K; i++) cin >> arr[i]; long long mn = 1e18; for(int N = 1; N < num; N++){ bool pos = true; for(int i = 0; i < K; i++){ if(!check(N + i, arr[i])){ pos = false; break; } } if(pos) chmin(mn, (ll) N); } cout << mn << '\n'; }

Compilation message (stderr)

sequence.cpp: In function 'int main()':
sequence.cpp:37:22: error: 'll' was not declared in this scope
   37 |   if(pos) chmin(mn, (ll) N);
      |                      ^~