結果

問題 No.186 中華風 (Easy)
ユーザー Honjo_MapleHonjo_Maple
提出日時 2023-03-26 17:48:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,552 bytes
コンパイル時間 3,649 ms
コンパイル使用メモリ 229,552 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 13:48:27
合計ジャッジ時間 4,448 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;

using mint = modint1000000007;
using mint1 = modint998244353;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vvd> vvvd;
typedef vector<mint> vm;
typedef vector<vm> vvm;
typedef vector<vvm> vvvm;
typedef vector<mint1> vm1;
typedef vector<vm1> vvm1;
typedef vector<vvm1> vvvm1;
typedef vector<modint> vm2;
typedef vector<vm2> vvm2;
typedef vector<vvm2> vvvm2;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<vvb> vvvb;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef vector<PL> vp;
typedef tuple<ll, ll, ll> tt;
typedef vector<tuple<ll, ll, ll>> vt;
typedef vector<string> vs;

struct Edge{
  long long to;
  long long cost;
};
typedef vector<vector<Edge> > Graph;

const long long INF = 1e9;
const long long INFL = 1e18;
const double PI = 3.14159265358979;
const double epsilon = 1e-12;

vector<int> dy = {1, 0, -1, 0};
vector<int> dx = {0, 1, 0, -1};




int main(){
  vl x(3), y(3);
  for(int i=0;i<3;i++){
    cin >> x[i] >> y[i];
  }
  auto c = crt(x, y);
  if(c.first == 0 && c.second == 0)cout << -1 << endl;
  else if(c.first == 0)cout << c.second << endl;
  else cout << c.first << endl;
  return 0;
}
0