Submission #364962

# Submission time Handle Problem Language Result Execution time Memory
364962 2021-02-10T15:49:39 Z Matteo_Verz Split (info1cup19_split) C++11
100 / 100
1 ms 364 KB
#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

split.cpp: In function 'int main()':
split.cpp:8:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |   for(int i = 0; i < s.size() / 2; i++) cout << s[i];
      |                  ~~^~~~~~~~~~~~~~
split.cpp:10:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |   for(int i = s.size() / 2; i < s.size(); i++) cout << s[i];
      |                             ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct