Submission #31008630
Source Code Expand
Copy
#include <bits/stdc++.h>#define ll long long#define sz(x) (int)x.size()#define endl "\n"#define nl endl#define ve vector#define pii pair <int, int>#define dbl double#define fi first#define se second#define all(x) (x).begin(), (x).end()#define pb(x) push_back(x)#define gcd __gcd#define no cout<<"NO"<<endl;#define yes cout<<"YES"<<endl;const int N = 1e9 + 123, M = 1e5 + 123;const int MOD = 1e9 + 7;const int INF = 1e18;using namespace std;
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)x.size() #define endl "\n" #define nl endl #define ve vector #define pii pair <int, int> #define dbl double #define fi first #define se second #define all(x) (x).begin(), (x).end() #define pb(x) push_back(x) #define gcd __gcd #define no cout<<"NO"<<endl; #define yes cout<<"YES"<<endl; const int N = 1e9 + 123, M = 1e5 + 123; const int MOD = 1e9 + 7; const int INF = 1e18; using namespace std; int mul(int a, int b) { return a * 1LL * b % MOD; } int binpow(int a, int n) { int res = 1; while (n) { if (n & 1) res = mul(res, a); a = mul(a, a); n >>= 1; } return res; } void solve(/**/) { string s; cin >> s; ve <bool> was(N, 0); for(char x : s){ was[x - '0'] = 1; } for(int i = 0;i<10;i++){ if(!was[i]){ cout << i; return; } } } void cf() {int tt;cin >> tt;while(tt--) {solve();}} int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // //cf(); solve(); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Lacked Number |
User | strikalo |
Language | C++ (GCC 9.2.1) |
Score | 100 |
Code Size | 1092 Byte |
Status | AC |
Exec Time | 81 ms |
Memory | 125408 KB |
Compile Error
./Main.cpp:19:17: warning: overflow in conversion from ‘double’ to ‘int’ changes value from ‘1.0e+18’ to ‘2147483647’ [-Woverflow] 19 | const int INF = 1e18; | ^~~~
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_00.txt, example_01.txt |
All | example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_00.txt | AC | 80 ms | 124976 KB |
example_01.txt | AC | 78 ms | 124976 KB |
hand_00.txt | AC | 77 ms | 124952 KB |
hand_01.txt | AC | 78 ms | 125408 KB |
random_00.txt | AC | 79 ms | 124984 KB |
random_01.txt | AC | 81 ms | 125048 KB |
random_02.txt | AC | 76 ms | 125408 KB |
random_03.txt | AC | 79 ms | 125016 KB |
random_04.txt | AC | 75 ms | 124916 KB |
random_05.txt | AC | 77 ms | 125016 KB |