답안 #645298

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
645298 2022-09-26T16:53:29 Z notme Split (info1cup19_split) C++14
100 / 100
1 ms 324 KB
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;

void speed()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
string s;
int main()
{
    speed();
    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];
    cout << endl;
    return 0;
}

Compilation message

split.cpp: In function 'int main()':
split.cpp:16:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     for (int i = 0; i < s.size()/2; ++ i)
      |                     ~~^~~~~~~~~~~~
split.cpp:19:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     for (int i = s.size()/2; i < s.size(); ++ i)
      |                              ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 320 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 316 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 320 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 316 KB Output is correct
15 Correct 1 ms 324 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 312 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct