Submission #690884

#TimeUsernameProblemLanguageResultExecution timeMemory
690884MateiKing80Split (info1cup19_split)C++14
100 / 100
1 ms308 KiB
#include <iostream> using namespace std; int v[30]; int main() { char ch; int sz; while(cin>>ch) { sz++; v[sz]=ch-'0'; } for(int i=1;i<=sz/2;i++) cout<<v[i]; cout<<" "; for(int i=sz/2+1;i<=sz;i++) cout<<v[i]; }

Compilation message (stderr)

split.cpp: In function 'int main()':
split.cpp:8:9: warning: 'sz' is used uninitialized in this function [-Wuninitialized]
    8 |     int sz;
      |         ^~
#Verdict Execution timeMemoryGrader output
Fetching results...