Submission #974801

#TimeUsernameProblemLanguageResultExecution timeMemory
974801lernSplit (info1cup19_split)C++11
100 / 100
1 ms600 KiB
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; for (int i = 0; i < s.size()/2; i++) { cout<<s[i]; } cout<<" "; for (int i = s.size()/2; i < s.size(); i++) { cout<<s[i]; } return 0; }

Compilation message (stderr)

split.cpp: In function 'int main()':
split.cpp:17:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     for (int i = 0; i < s.size()/2; i++) {
      |                     ~~^~~~~~~~~~~~
split.cpp:21:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |     for (int i = s.size()/2; i < s.size(); i++) {
      |                              ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...