Submission #1179545
Source Code Expand
#include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<vector> #include<algorithm> #define rep(n) for(int i=0;i<n;i++) #define repp(j, n) for(int j=0;j<n;j++) #define reppp(i, m, n) for(int i=m;i<=n;i++) #define all(c) c.begin(), c.end() #define MOD 1000000007 #define MAX 1000000001 #define INF 1410065408 using namespace std; typedef long long ll; typedef pair<ll, ll> P; struct edge{int from, to; ll cost;}; int main(){ ll N, K; cin >> N >> K; if(N == K){ cout << ""; return 0; } vector<ll> an(K); vector<string> av(K), sv(N-K); rep(K) cin >> an[i]; int j = 0, k = 0; int min_length = 100000; rep(N){ if(an[j] - 1 == i){ cin >> av[j]; if(min_length > (int)av[j].length()) min_length = (int)av[j].length(); j++; }else{ cin >> sv[k]; k++; } } string ans = "-1"; cout << ans; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 検索 |
User | Noimin |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1040 Byte |
Status | RE |
Exec Time | 135 ms |
Memory | 5376 KB |
Judge Result
Set Name | Sample | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in2.txt, in20.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, long.txt, long2.txt, sample1.txt, sample2.txt, sample3.txt, long.txt, long2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | RE | 113 ms | 384 KB |
in10.txt | RE | 111 ms | 384 KB |
in11.txt | RE | 115 ms | 896 KB |
in12.txt | RE | 112 ms | 256 KB |
in13.txt | RE | 113 ms | 384 KB |
in14.txt | RE | 113 ms | 384 KB |
in15.txt | WA | 3 ms | 384 KB |
in16.txt | AC | 1 ms | 256 KB |
in17.txt | RE | 113 ms | 384 KB |
in18.txt | RE | 110 ms | 256 KB |
in19.txt | RE | 117 ms | 896 KB |
in2.txt | RE | 119 ms | 896 KB |
in20.txt | RE | 113 ms | 512 KB |
in3.txt | RE | 135 ms | 5376 KB |
in4.txt | AC | 1 ms | 256 KB |
in5.txt | RE | 112 ms | 256 KB |
in6.txt | RE | 111 ms | 256 KB |
in7.txt | RE | 110 ms | 384 KB |
in8.txt | RE | 114 ms | 896 KB |
in9.txt | AC | 1 ms | 256 KB |
long.txt | WA | 5 ms | 384 KB |
long2.txt | WA | 13 ms | 2176 KB |
sample1.txt | WA | 1 ms | 256 KB |
sample2.txt | AC | 1 ms | 256 KB |
sample3.txt | AC | 1 ms | 256 KB |