Submission #2908442
Source Code Expand
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> #include<cstdlib> #include<string> #include<sstream> #include<cmath> #include<numeric> #include<map> #include<stack> #include<queue> #include<list> #include<set> using namespace std; int mod = 1e9+7; int main() { int n; cin >> n; vector<string> s(n); for(int i=0; i<n; i++) cin >> s[i]; string t; cin >> t; int r = 0; int l = 0; for(int i=0; i<n; i++){ string a = s[i]; string b = s[i]; for(int j=0; j<a.size(); j++){ if( a[j] == '?' ) a[j] = 'a'; if( b[j] == '?' ) b[j] = 'z'; } cerr << a << " " << b << endl; if( a <= t ) r++; if( b >= t ) l++; } cerr << l << " " << r << endl; for(int i=n-l; i<=r; i++){ cout << i+1 << endl; } return 0; } //
Submission Info
Submission Time | |
---|---|
Task | A - Atcoder Handles |
User | yut071 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 838 Byte |
Status | WA |
Exec Time | 31 ms |
Memory | 896 KB |
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 | AC | 1 ms | 256 KB |
sub1_in2.txt | WA | 3 ms | 256 KB |
sub1_in3.txt | AC | 3 ms | 256 KB |
sub2_in1.txt | WA | 2 ms | 256 KB |
sub2_in2.txt | WA | 19 ms | 640 KB |
sub2_in3.txt | WA | 31 ms | 896 KB |