Submission #68103707
Source Code Expand
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using pli = pair<ll,int>;
#define AMARI 998244353
//#define AMARI 1000000007
#define el '\n'
#define El '\n'
#define YESNO(x) ((x) ? "Yes" : "No")
#define YES YESNO(true)
#define NO YESNO(false)
#define EXIT_ANS(x) {cout << (x) << '\n'; return;}
template <typename T> void inline SORT(vector<T> &v){sort(v.begin(),v.end()); return;}
template <typename T> void inline REV(vector<T> &v){reverse(v.begin(),v.end()); return;}
template <typename T> void inline VEC_UNIQ(vector<T> &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); return;}
template <typename T> T inline MAX(vector<T> &v){return *max_element(v.begin(),v.end());}
template <typename T> T inline MIN(vector<T> &v){return *min_element(v.begin(),v.end());}
template <typename T> T inline SUM(vector<T> &v){T ans = 0; for(int i = 0; i < (int)v.size(); i++)ans += v[i]; return ans;}
template <typename T> void inline DEC(vector<T> &v){for(int i = 0; i < (int)v.size(); i++)v[i]--; return;}
template <typename T> void inline INC(vector<T> &v){for(int i = 0; i < (int)v.size(); i++)v[i]++; return;}
void inline TEST(void){cerr << "TEST" << endl; return;}
template <typename T> bool inline chmin(T &x,T y){
if(x > y){
x = y;
return true;
}
return false;
}
template <typename T> bool inline chmax(T &x,T y){
if(x < y){
x = y;
return true;
}
return false;
}
template <typename T = long long> vector<T> inline get_vec(int n){
vector<T> ans(n);
for(int i = 0; i < n; i++)cin >> ans[i];
return ans;
}
template <typename T> void inline print_vec(vector<T> &vec,bool kaigyou = false){
int n = (int)vec.size();
for(int i = 0; i < n; i++){
cout << vec[i];
if(kaigyou || i == n - 1)cout << '\n';
else cout << ' ';
}
if(!n)cout << '\n';
return;
}
template <typename T> void inline debug_vec(vector<T> &vec,bool kaigyou = false){
int n = (int)vec.size();
for(int i = 0; i < n; i++){
cerr << vec[i];
if(kaigyou || i == n - 1)cerr << '\n';
else cerr << ' ';
}
if(!n)cerr << '\n';
return;
}
vector<vector<int>> inline get_graph(int n,int m = -1,bool direct = false){
if(m == -1)m = n - 1;
vector<vector<int>> g(n);
while(m--){
int u,v;
cin >> u >> v;
u--; v--;
g[u].push_back(v);
if(!direct)g[v].push_back(u);
}
return g;
}
template <typename T> vector<vector<T>> inline get_weighted_graph(int n,int m = -1,bool direct = false){
if(m == -1)m = n - 1;
vector<vector<pair<T,int>>> g(n);
while(m--){
int u,v;
cin >> u >> v;
u--; v--;
ll w; cin >> w;
g[u].push_back(pair(w,v));
if(!direct)g[v].push_back(pair(w,u));
}
return g;
}
vector<int> make_inv(vector<int> p){
int n = (int)p.size();
vector<int> ans(n);
for(int i = 0; i < n; i++)ans[p[i]] = i;
return ans;
}
#define MULTI_TEST_CASE false
void solve(void){
//問題を見たらまず「この問題設定から言えること」をいっぱい言う
//よりシンプルな問題に言い換えられたら、言い換えた先の問題を自然言語ではっきりと書く
//複数の解法のアイデアを思いついた時は全部メモしておく
//g++ -D_GLIBCXX_DEBUG -Wall -O2 a.cpp -o o
int n;
cin >> n;
int a,b;
cin >> a >> b;
string s;
cin >> s;
for(int i = a; i < n - b; i++)cout<< s[i];cout << el;
return;
}
void calc(void){
return;
}
signed main(void){
cin.tie(nullptr);
ios::sync_with_stdio(false);
calc();
int t = 1;
if(MULTI_TEST_CASE)cin >> t;
while(t--){
solve();
}
return 0;
}
Submission Info
Submission Time
2025-08-02 21:02:03+0900
Task
A - A Substring
User
ococonomy1
Language
C++ 17 (gcc 12.2)
Score
100
Code Size
4054 Byte
Status
AC
Exec Time
1 ms
Memory
3564 KiB
Compile Error
Main.cpp: In function ‘void solve()’:
Main.cpp:111:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
111 | for(int i = a; i < n - b; i++)cout<< s[i];cout << el;
| ^~~
Main.cpp:111:47: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
111 | for(int i = a; i < n - b; i++)cout<< s[i];cout << el;
| ^~~~
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
100 / 100
Status
Set Name
Test Cases
Sample
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt
Case Name
Status
Exec Time
Memory
00_sample_00.txt
AC
1 ms
3432 KiB
00_sample_01.txt
AC
1 ms
3484 KiB
00_sample_02.txt
AC
1 ms
3496 KiB
01_random_03.txt
AC
1 ms
3424 KiB
01_random_04.txt
AC
1 ms
3484 KiB
01_random_05.txt
AC
1 ms
3492 KiB
01_random_06.txt
AC
1 ms
3420 KiB
01_random_07.txt
AC
1 ms
3420 KiB
01_random_08.txt
AC
1 ms
3564 KiB
01_random_09.txt
AC
1 ms
3492 KiB