Submission #3626636
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x,y) scanf("%d%d", &x, &y)
#define Scd3(x,y,z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%llu", &x)
#define Scll2(x,y) scanf("%llu%llu", &x, &y)
#define Scll3(x,y,z) scanf("%llu%llu%llu", &x, &y, &z)
#define Scc(c) scanf("%c", &c);
#define Scs(s) scanf("%s", s);
#define Scstr(s) scanf("%s", &s);
// }}} 2
// constants {{{ 2
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// }}} 2
// systems {{{ 2
#define Rep(x,y) for(int x = 0; x < y; x++)
#define Repe(x,y,z) for(int x = z; x < y; x++)
// }}} 2
// output {{{ 2
#define YesNo(a) (a)?printf("Yes\n"):printf("No\n");
// }}} 2
// }}} 1
int main() {
int n;
Scd(n);
char s[100003][21] = {{}};
char t[21] = {};
Rep(i,n){
Scs(s[i]);
}
Scs(t);
int len = strlen(t);
int less = 1, great = n+1;
Rep(i,n){
Rep(j,len){
if( !t[j] && !s[i][j] ){
break;
}
if( !t[j] ){
great--;
break;
}
if( !s[i][j] ){
less++;
break;
}
if( s[i][j] == '?' ){
if( t[j] == 'z' || t[j] == 'a' ){
continue;
}
break;
}else if( s[i][j] > t[j] ){
great--;
break;
}else if( s[i][j] < t[j] ){
less++;
break;
}else{
continue;
}
}
}
Repe(i,great+1,less)
printf ( i == great ? "%d" : "%d " , i);
return 0;
}
Submission Info
Submission Time |
|
Task |
A - Atcoder Handles |
User |
nishionyama |
Language |
C++14 (GCC 5.4.1) |
Score |
0 |
Code Size |
1845 Byte |
Status |
WA |
Exec Time |
3 ms |
Memory |
2304 KB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:41:11: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Scd(n);
^
./Main.cpp:17:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
#define Scs(s) scanf("%s", s);
^
./Main.cpp:46:9: note: in expansion of macro ‘Scs’
Scs(s[i]);
^
./Main.cpp:17:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
#define Scs(s) scanf("%s", s);
^
./Main.cpp:48:5: note: in expansion of macro ‘Scs’
Scs(t);
^
Judge Result
Set Name |
Subtask1 |
Subtask2 |
Score / Max Score |
0 / 130 |
0 / 120 |
Status |
|
|
Set Name |
Test Cases |
Subtask1 |
sub1_in1.txt, sub1_in2.txt, sub1_in3.txt |
Subtask2 |
sub1_in1.txt, sub1_in2.txt, sub1_in3.txt, sub2_in1.txt, sub2_in2.txt, sub2_in3.txt |
Case Name |
Status |
Exec Time |
Memory |
sub1_in1.txt |
WA |
2 ms |
2304 KB |
sub1_in2.txt |
WA |
2 ms |
2304 KB |
sub1_in3.txt |
WA |
2 ms |
2304 KB |
sub2_in1.txt |
WA |
2 ms |
2304 KB |
sub2_in2.txt |
WA |
3 ms |
2304 KB |
sub2_in3.txt |
WA |
3 ms |
2304 KB |