Task: | Greater Integers |
Sender: | dusty_sky |
Submission time: | 2021-01-30 18:09:39 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.01 s | 2 | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:49:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<ss.size();i++) ~^~~~~~~~~~ input/code.cpp:52:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<=ss.size();i++)cout<<1; ~^~~~~~~~~~~ input/code.cpp:61:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<ss.size();i++)cout<<zx; ~^~~~~~~~~~
Code
#include<bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define T true #define F false #define fi first #define endl "\n" #define se second #define DIM 100001 #define pb push_back #define amen exit(0); #define qwe return 0; #define eps 0.0000001 #define mod 1000000007 #define INF 1000000000001 #define gg cout<<"OPS"<<endl; #define PI 3.1415926535897932384626433 #define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0); #define time cout << "\nTime Elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " sec\n"; typedef char ch; typedef bool boll; typedef string st; typedef long long ll; typedef long double ld; typedef set < string > sst; typedef set < long long > sll; typedef unsigned long long ull; typedef queue < long long > que; typedef deque < long long > deq; typedef vector < long long > vec; typedef map < long long, long long > mll; typedef pair < long long, long long > pll; typedef pair < long long, unsigned long long > pul; typedef vector < pair < long long, long long > > vpl; typedef tree <ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> myset; ll n,z,x,s; int main() { fast; ll t; cin>>t; while(t--){ st ss; cin>>ss; sll s1; s1.clear(); for(int i=0;i<ss.size();i++) s1.insert(ss[i]-'0'); if(s1.size()==1 && *s1.begin()==9){ for(int i=0;i<=ss.size();i++)cout<<1; cout<<endl; } else{ ll zx=0; if(s1.size()==1) zx=*s1.begin()+1; else if(*s1.rbegin()>ss[0]-'0')zx=ss[0]-'0',zx++; else zx=ss[0]-'0'; for(int i=0;i<ss.size();i++)cout<<zx; cout<<endl; } } //time; }
Test details
Test 1
Group: 1, 2
Verdict: WRONG ANSWER
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 |
---|
888888888888888888 888888888888888888 555555555555555555 222222222222222222 55555555555555 ... Truncated |