This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int d[2010][2010], u[2010][2010], l[2010][2010], r[2010][2010], dig[2010][2010]; | |
int main() { | |
cin.tie(0); | |
ios::sync_with_stdio(false); | |
cout << fixed << setprecision(12); | |
int n, m; cin >> n >> m; | |
vector<vector<int>> v(n, vector<int>(m)); | |
REP(i,n) { | |
string s; cin >> s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
//#include <atcoder/all> | |
//using namespace atcoder; | |
#pragma GCC target ("avx2") | |
#pragma GCC optimization ("O3") | |
#pragma GCC optimization ("unroll-loops") | |
using namespace std; | |
typedef vector<int> VI; | |
typedef vector<VI> VVI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
#define all(x) x.begin(), x.end() | |
using ll = long long; | |
struct Rational { | |
ll N, D; | |
ll GCD(ll x, ll y) { |