# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
97281 | 2019-02-14T18:26:01 Z | model_code | Bitaro the Brave (JOI19_ho_t1) | C++17 | 96 ms | 9464 KB |
#include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<deque> #include<stack> #include<string> #include<string.h> #include<vector> #include<set> #include<map> #include<bitset> #include<stdlib.h> #include<cassert> #include<time.h> #include<bitset> using namespace std; const long long mod=1000000007; const long long inf=mod*mod; const long long d2=(mod+1)/2; const long double EPS=1e-9; const long double PI=acos(-1.0); int ABS(int a){return max(a,-a);} long long ABS(long long a){return max(a,-a);} long double ABS(long double a){return max(a,-a);} int T[3100]; char in[3100][3100]; int main(){ int a,b;scanf("%d%d",&a,&b); for(int i=0;i<a;i++)scanf("%s",in[i]); long long ret=0; for(int i=a-1;i>=0;i--){ int tmp=0; for(int j=b-1;j>=0;j--){ if(in[i][j]=='O')tmp++; if(in[i][j]=='I')T[j]++; if(in[i][j]=='J'){ ret+=tmp*T[j]; } } } printf("%lld\n",ret); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 640 KB | Output is correct |
6 | Correct | 2 ms | 640 KB | Output is correct |
7 | Correct | 2 ms | 640 KB | Output is correct |
8 | Correct | 3 ms | 640 KB | Output is correct |
9 | Correct | 2 ms | 640 KB | Output is correct |
10 | Correct | 3 ms | 640 KB | Output is correct |
11 | Correct | 2 ms | 640 KB | Output is correct |
12 | Correct | 2 ms | 512 KB | Output is correct |
13 | Correct | 2 ms | 640 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 640 KB | Output is correct |
6 | Correct | 2 ms | 640 KB | Output is correct |
7 | Correct | 2 ms | 640 KB | Output is correct |
8 | Correct | 3 ms | 640 KB | Output is correct |
9 | Correct | 2 ms | 640 KB | Output is correct |
10 | Correct | 3 ms | 640 KB | Output is correct |
11 | Correct | 2 ms | 640 KB | Output is correct |
12 | Correct | 2 ms | 512 KB | Output is correct |
13 | Correct | 2 ms | 640 KB | Output is correct |
14 | Correct | 5 ms | 1792 KB | Output is correct |
15 | Correct | 3 ms | 1664 KB | Output is correct |
16 | Correct | 3 ms | 1152 KB | Output is correct |
17 | Correct | 2 ms | 384 KB | Output is correct |
18 | Correct | 6 ms | 1792 KB | Output is correct |
19 | Correct | 5 ms | 1920 KB | Output is correct |
20 | Correct | 4 ms | 1792 KB | Output is correct |
21 | Correct | 6 ms | 1920 KB | Output is correct |
22 | Correct | 4 ms | 1792 KB | Output is correct |
23 | Correct | 3 ms | 1792 KB | Output is correct |
24 | Correct | 6 ms | 1792 KB | Output is correct |
25 | Correct | 4 ms | 1792 KB | Output is correct |
26 | Correct | 4 ms | 1792 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 640 KB | Output is correct |
6 | Correct | 2 ms | 640 KB | Output is correct |
7 | Correct | 2 ms | 640 KB | Output is correct |
8 | Correct | 3 ms | 640 KB | Output is correct |
9 | Correct | 2 ms | 640 KB | Output is correct |
10 | Correct | 3 ms | 640 KB | Output is correct |
11 | Correct | 2 ms | 640 KB | Output is correct |
12 | Correct | 2 ms | 512 KB | Output is correct |
13 | Correct | 2 ms | 640 KB | Output is correct |
14 | Correct | 5 ms | 1792 KB | Output is correct |
15 | Correct | 3 ms | 1664 KB | Output is correct |
16 | Correct | 3 ms | 1152 KB | Output is correct |
17 | Correct | 2 ms | 384 KB | Output is correct |
18 | Correct | 6 ms | 1792 KB | Output is correct |
19 | Correct | 5 ms | 1920 KB | Output is correct |
20 | Correct | 4 ms | 1792 KB | Output is correct |
21 | Correct | 6 ms | 1920 KB | Output is correct |
22 | Correct | 4 ms | 1792 KB | Output is correct |
23 | Correct | 3 ms | 1792 KB | Output is correct |
24 | Correct | 6 ms | 1792 KB | Output is correct |
25 | Correct | 4 ms | 1792 KB | Output is correct |
26 | Correct | 4 ms | 1792 KB | Output is correct |
27 | Correct | 94 ms | 9464 KB | Output is correct |
28 | Correct | 7 ms | 7424 KB | Output is correct |
29 | Correct | 6 ms | 1152 KB | Output is correct |
30 | Correct | 2 ms | 384 KB | Output is correct |
31 | Correct | 68 ms | 7924 KB | Output is correct |
32 | Correct | 44 ms | 9336 KB | Output is correct |
33 | Correct | 42 ms | 9344 KB | Output is correct |
34 | Correct | 96 ms | 9084 KB | Output is correct |
35 | Correct | 50 ms | 9436 KB | Output is correct |
36 | Correct | 45 ms | 9336 KB | Output is correct |
37 | Correct | 96 ms | 9460 KB | Output is correct |
38 | Correct | 39 ms | 7904 KB | Output is correct |
39 | Correct | 34 ms | 7932 KB | Output is correct |