답안 #913595

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
913595 2024-01-20T08:28:51 Z __newbie__ Bitaro the Brave (JOI19_ho_t1) C
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>

#define pb push_back
#define int ll
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
int N = 3e3 + 20;

signed main()
{
	int h, w; cin >> h >> w;
	
	vii a(N, vi(N)), b(N, vi(N));
	
	vpii J(N);
	
	vii gr(N, vi(N));
	
	for (int i = 1; i <= h; i++)
	{
		string s; cin >> s; 
		s = "$" + s;
		
		for (int j = 1; j <= w; j++)
		{
			gr[i][j] = s[j];
			if (s[j] == 'J') J.pb({i, j});	
		}
	}
	
	for (int i = h; i >= 1; i--)
	{
		for (int j = w; j >= 1; j--)
		{
			a[i][j] = a[i][j + 1] + (gr[i][j] == 'O');	
			b[i][j] = b[i + 1][j] + (gr[i][j] == 'I');
		}
	}
	
	int ans = 0;
	
	for (auto [i, j] : J)
	{
		ans += a[i][j] * b[i][j];
	}
	
	cout << ans;
}

Compilation message

joi2019_ho_t1.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.