Submission #1198171
Source Code Expand
#include <bits/stdc++.h>
#ifndef LOCAL_
#define fprintf if( false ) fprintf
#endif // LOCAL_
#define dumpl(x1) fprintf(stderr, "#%s.%d (%s) = (%ld)\n", __func__, __LINE__, #x1, x1);
#define dumpll(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%ld, %ld)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define dumplll(x1, x2, x3) fprintf(stderr, "#%s.%d (%s, %s, %s) = (%ld, %ld, %ld)\n", __func__, __LINE__, #x1, #x2, #x3, x1, x2, x3);
#define dumpd(x1) fprintf(stderr, "#%s.%d (%s) = (%lf)\n", __func__, __LINE__, #x1, x1);
#define dumpdd(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%lf, %lf)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define loop for(;;)
struct S002 {
int n;
S002& operator > (long& x) {
n = x;
return *this;
}
S002& operator > (long&& x) {
n = x;
return *this;
}
S002& operator >= (long& x) {
if( scanf("%ld", &x) <= 0 ) exit(0);
return *this;
}
S002& operator >= (double& x) {
if( scanf("%lf", &x) <= 0 ) exit(0);
return *this;
}
S002& operator >= (std::string& s) {
if( not (std::cin >> s) ) exit(0);
return *this;
}
template<typename a>
S002& operator >= (std::vector<a>& v) {
v.resize(n);
for(long i = 0; i < n; ++i) {
*this >= v[i];
}
return *this;
}
template<typename a, std::size_t s>
S002& operator >= (std::array<a, s>& x) {
for(long i = 0; i < (long)s; ++i) {
*this >= x[i];
}
return *this;
}
};
struct Solver {
std::string str;
Solver() {
S002 reader;
reader >= str;
}
void solve() {
for(long i = 0; i < 4; ++i) {
putchar(str[i]);
}
putchar(' ');
for(long i = 4; i < (long)str.size(); ++i) {
putchar(str[i]);
}
putchar('\n');
}
};
int main() {
loop std::unique_ptr<Solver>(new Solver())->solve();
return 0;
}
Submission Info
Submission Time |
|
Task |
A - CODEFESTIVAL 2016 |
User |
spica314 |
Language |
C++14 (GCC 5.4.1) |
Score |
100 |
Code Size |
1897 Byte |
Status |
AC |
Exec Time |
3 ms |
Memory |
256 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
100 / 100 |
Status |
|
|
Set Name |
Test Cases |
Sample |
0_00.txt, 0_01.txt, 0_02.txt |
All |
0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt |
Case Name |
Status |
Exec Time |
Memory |
0_00.txt |
AC |
1 ms |
256 KB |
0_01.txt |
AC |
1 ms |
256 KB |
0_02.txt |
AC |
1 ms |
256 KB |
1_00.txt |
AC |
1 ms |
256 KB |
1_01.txt |
AC |
1 ms |
256 KB |
1_02.txt |
AC |
3 ms |
256 KB |