Skip to content

Instantly share code, notes, and snippets.

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;
@c3pk1
c3pk1 / aoj1604.cpp
Created October 21, 2021 14:38
aoj1604.cpp
#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;
#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) {