Submission #00099


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <bits/stdc++.h>
#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define LCM(a, b) (a) / __gcd((a), (b)) * (b)
#define CEIL(a, b) (a)/(b)+(((a)%(b))?1:0)
#define ln '\n'
using namespace std;
using LL = long long;
using ldouble = long double;
using P = pair<int, int>;
using LP = pair<LL, LL>;
static const int INF = INT_MAX;
static const LL LINF = 1000000;
static const int MIN = INT_MIN;
static const LL LMIN = LLONG_MIN;
static const int MOD = 1e9 + 7;
static const int SIZE = 200005;
const int dx[] = {0, -1, 1, 0};
const int dy[] = {-1, 0, 0, 1};
vector<LL> Div(LL n) {
vector<LL> ret;
for(LL i = 1; i * i <= n; ++i) {
if(n % i == 0) {
ret.pb(i);
if(i * i != n) ret.pb(n / i);
}
}
sort(all(ret));
return ret;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, L;
cin >> N >> L;
LP tp[15];
tp[0].F = tp[0].S = -1;
for(int i = 1; i <= L; ++i) {
cin >> tp[i].F;
tp[i].S = i;
}
sort(tp, tp + L + 1);
LL d = 1;
for(int i = 1; i <= L; ++i) {
tp[i].F = d;
d *= 20;
}
LL p[15];
for(int i = 1; i <= L; ++i) {
p[tp[i].S] = tp[i].F;
}
vector<LP> v;
for(int i = 0; i < N; ++i) {
string s;
cin >> s;
LL sum = 0;
for(int j = 0; j < s.size(); ++j) {
if(s[j] == 'o') {
sum += p[j + 1];
}
}
v.pb(MP(sum, -(i + 1)));
}
sort(all(v), greater<LP>());
for(int i = 0; i < v.size(); ++i) {
cout << -v[i].S << endl;
}
return 0;
}

ステータス

項目 データ
問題 0007 - 998244353点
ユーザー名 crom
投稿日時 2020-04-25 22:20:06
言語 C++14
状態 Accepted
得点 400
ソースコード長 1824 Byte
最大実行時間 222 ms
最大メモリ使用量 14976 KB

セット

セット 得点 Cases
1 ALL 400 / 400 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 24 ms 476 KB
1
in02.txt AC 22 ms 428 KB
1
in03.txt AC 20 ms 376 KB
1
in04.txt AC 21 ms 456 KB
1
in05.txt AC 23 ms 404 KB
1
in06.txt AC 209 ms 2644 KB
1
in07.txt AC 202 ms 3212 KB
1
in08.txt AC 91 ms 2852 KB
1
in09.txt AC 143 ms 3452 KB
1
in10.txt AC 43 ms 2760 KB
1
in11.txt AC 218 ms 4664 KB
1
in12.txt AC 208 ms 5216 KB
1
in13.txt AC 222 ms 5772 KB
1
in14.txt AC 214 ms 6312 KB
1
in15.txt AC 217 ms 6988 KB
1
in16.txt AC 210 ms 7528 KB
1
in17.txt AC 215 ms 8080 KB
1
in18.txt AC 203 ms 8628 KB
1
in19.txt AC 211 ms 9300 KB
1
in20.txt AC 212 ms 9720 KB
1
in21.txt AC 207 ms 10392 KB
1
in22.txt AC 201 ms 10944 KB
1
in23.txt AC 214 ms 11496 KB
1
in24.txt AC 219 ms 12048 KB
1
in25.txt AC 213 ms 12716 KB
1
in26.txt AC 206 ms 13264 KB
1
in27.txt AC 20 ms 11520 KB
1
in28.txt AC 27 ms 11600 KB
1
in29.txt AC 18 ms 11432 KB
1
in30.txt AC 19 ms 11512 KB
1
in31.txt AC 203 ms 13756 KB
1
in32.txt AC 203 ms 14296 KB
1
in33.txt AC 205 ms 14976 KB
1
sample01.txt AC 22 ms 13232 KB
1
sample02.txt AC 17 ms 13308 KB
1
sample03.txt AC 24 ms 13132 KB
1