Submission #203750

# Submission time Handle Problem Language Result Execution time Memory
203750 2020-02-22T05:25:02 Z aloo123 Split (info1cup19_split) C++14
100 / 100
5 ms 504 KB
#include<bits/stdc++.h>
using namespace std;

int main(){
  
  string s;
  cin>>s;
  int n = (int)s.size();n/=2;
  for(int i = 0;i<n;i++)cout<<s[i];cout<<" ";
  for(int i = n;i<n*2;i++) cout<<s[i];cout<<endl;
  
  
  return 0;
}

Compilation message

split.cpp: In function 'int main()':
split.cpp:9:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int i = 0;i<n;i++)cout<<s[i];cout<<" ";
   ^~~
split.cpp:9:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int i = 0;i<n;i++)cout<<s[i];cout<<" ";
                                    ^~~~
split.cpp:10:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int i = n;i<n*2;i++) cout<<s[i];cout<<endl;
   ^~~
split.cpp:10:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int i = n;i<n*2;i++) cout<<s[i];cout<<endl;
                                       ^~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
4 Correct 5 ms 376 KB Output is correct
5 Correct 5 ms 376 KB Output is correct
6 Correct 5 ms 248 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
8 Correct 5 ms 256 KB Output is correct
9 Correct 5 ms 504 KB Output is correct
10 Correct 4 ms 256 KB Output is correct
11 Correct 5 ms 376 KB Output is correct
12 Correct 4 ms 256 KB Output is correct
13 Correct 5 ms 376 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 5 ms 376 KB Output is correct
16 Correct 5 ms 376 KB Output is correct
17 Correct 5 ms 376 KB Output is correct
18 Correct 5 ms 504 KB Output is correct
19 Correct 5 ms 376 KB Output is correct
20 Correct 5 ms 376 KB Output is correct