Submission #1869026
Source Code Expand
include <stdio.h> int main(void) { char S[101], t; int n, l, r, i, j; scanf("%s", S); scanf("%d", &n); for (i=0; i<n; i++) { scanf("%d%d", &l, &r); l--; r--; for (j=0; j<(r-l+1)/2; j++) { t=S[l+j]; S[l+j]=S[r-j]; S[r-j]=t; } } printf("%s\n", S); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 文字列の反転 |
User | momonga130jp |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 383 Byte |
Status | CE |
Compile Error
./Main.cpp:1:1: error: ‘include’ does not name a type include <stdio.h> ^