Submission #70023166


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
template<class T> bool chmax(T &a, const T &b) { if(a<b){a=b;return 1;}return 0;}
template<class T> bool chmin(T &a, const T &b) { if(a>b){a=b;return 1;}return 0;}
//-------------------------------------------------------

string S;

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>S;
	int N=S.size();
	FOR(i,N) if(i!=N/2) cout<<S[i];
	cout<<endl;
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}

Submission Info

Submission Time
Task A - ABC -> AC
User kmjp
Language C++ 20 (gcc 12.2)
Score 100
Code Size 966 Byte
Status AC
Exec Time 1 ms
Memory 3568 KiB

Compile Error

Main.cpp: In function ‘void solve()’:
Main.cpp:19:15: warning: unused variable ‘j’ [-Wunused-variable]
   19 |         int i,j,k,l,r,x,y; string s;
      |               ^
Main.cpp:19:17: warning: unused variable ‘k’ [-Wunused-variable]
   19 |         int i,j,k,l,r,x,y; string s;
      |                 ^
Main.cpp:19:19: warning: unused variable ‘l’ [-Wunused-variable]
   19 |         int i,j,k,l,r,x,y; string s;
      |                   ^
Main.cpp:19:21: warning: unused variable ‘r’ [-Wunused-variable]
   19 |         int i,j,k,l,r,x,y; string s;
      |                     ^
Main.cpp:19:23: warning: unused variable ‘x’ [-Wunused-variable]
   19 |         int i,j,k,l,r,x,y; string s;
      |                       ^
Main.cpp:19:25: warning: unused variable ‘y’ [-Wunused-variable]
   19 |         int i,j,k,l,r,x,y; string s;
      |                         ^
Main.cpp: In function ‘int main(int, char**)’:
Main.cpp:6:19: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
    6 | #define FOR(x,to) for(x=0;x<(to);x++)
      |                   ^~~
Main.cpp:31:9: note: in expansion of macro ‘FOR’
   31 |         FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
      |         ^~~
Main.cpp:6:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
    6 | #define FOR(x,to) for(x=0;x<(to);x++)
      |                   ^~~
Main.cpp:31:45: note: in expansion of macro ‘FOR’
   31 |         FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
      |                                             ^~~
Main.cpp:6:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    6 | #define FOR(x,to) for(x=0;x<(to);x++)
      |                            ^
Main.cpp:31:45: note: in expansion of macro ‘FOR’
   31 |         FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
      |                                             ^~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 11
Set Name Test Cases
Sample sample00.txt, sample01.txt, sample02.txt
All sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt
Case Name Status Exec Time Memory
sample00.txt AC 1 ms 3492 KiB
sample01.txt AC 1 ms 3444 KiB
sample02.txt AC 1 ms 3504 KiB
testcase00.txt AC 1 ms 3396 KiB
testcase01.txt AC 1 ms 3508 KiB
testcase02.txt AC 1 ms 3496 KiB
testcase03.txt AC 1 ms 3432 KiB
testcase04.txt AC 1 ms 3492 KiB
testcase05.txt AC 1 ms 3568 KiB
testcase06.txt AC 1 ms 3436 KiB
testcase07.txt AC 1 ms 3504 KiB