Task: | Greater Integers |
Sender: | tutis |
Submission time: | 2021-01-30 18:39:35 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 35 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 35 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.01 s | 2 | details |
Code
/*input 3 5 9 123 */ #pragma GCC optimize ("O3") #pragma GCC target ("avx2") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T, typename X> using ordered_map = tree<T, X, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T, typename X> using fast_map = cc_hash_table<T, X>; //using ull = __uint128_t; using ull = unsigned long long; using ll = long long; using ld = long double; mt19937_64 rng(123); const ll mod = 1000000007; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t; cin >> t; set<ll>x; for (int c = 1; c <= 19; c++) for (int d = 1; d <= 9; d++) { if (c == 19 && d == 2) break; x.insert(stoll(string(c, '0' + d))); } while (t--) { int n; cin >> n; cout << *x.upper_bound(n) << "\n"; } }
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
input |
---|
1000 1 2 3 4 ... |
correct output |
---|
2 3 4 5 6 ... |
user output |
---|
2 3 4 5 6 ... Truncated |
Test 2
Group: 2
Verdict: WRONG ANSWER
input |
---|
1000 735425311146082632 756615631808964686 466489470801941584 100417544394053220 ... |
correct output |
---|
777777777777777777 777777777777777777 555555555555555555 111111111111111111 555555555555555555 ... |
user output |
---|
2222222222 2222222222 2222222222 2222222222 2222222222 ... Truncated |