Submission #1561350
Source Code Expand
#include <bits/stdc++.h> #include <random> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) #define pb push_back typedef long long ll; typedef pair<int, int> i_i; typedef pair<ll, int> ll_i; const int MOD = 998244353; const int INF = INT_MAX / 2; struct edge { int v, w; }; #define double long double double d(int x1, int y1, int x2, int y2) { double dx = x1 - x2, dy = y1 - y2; return sqrt(dx * dx + dy * dy); } int main() { int N; cin >> N; vector<int> x(N), y(N); rep(i, N) cin >> x[i] >> y[i]; int ans = 1; rep(t, N) ans = ans * 2 % MOD; rep(i, N) rep(j, i) { int n = 0; rep(k, N) if (k != i && k != j) { double d1 = d(x[k], y[k], x[i], y[i]); double d2 = d(x[k], y[k], x[j], y[j]); double d3 = d(x[i], y[i], x[j], y[j]); if (abs(d1 + d2 - d3) < 1e-12) n++; } int x = 1; rep(t, n) x = x * 2 % MOD; ans = (ans - x) % MOD; } ans = (ans - N - 1) % MOD; cout << (ans + MOD) % MOD << endl; }
Submission Info
Submission Time | |
---|---|
Task | E - ConvexScore |
User | sugim48 |
Language | C++14 (GCC 5.4.1) |
Score | 700 |
Code Size | 987 Byte |
Status | AC |
Exec Time | 86 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 700 / 700 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt, 1_018.txt, 1_019.txt, 1_020.txt, 1_021.txt, 1_022.txt, 1_023.txt, 1_024.txt, 1_025.txt, 1_026.txt, 1_027.txt, 1_028.txt, 1_029.txt, 1_030.txt, 1_031.txt, 1_032.txt, 1_033.txt, 1_034.txt, 1_035.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 1 ms | 256 KB |
0_001.txt | AC | 1 ms | 256 KB |
0_002.txt | AC | 1 ms | 256 KB |
1_003.txt | AC | 1 ms | 256 KB |
1_004.txt | AC | 1 ms | 256 KB |
1_005.txt | AC | 17 ms | 256 KB |
1_006.txt | AC | 1 ms | 256 KB |
1_007.txt | AC | 33 ms | 256 KB |
1_008.txt | AC | 21 ms | 256 KB |
1_009.txt | AC | 26 ms | 256 KB |
1_010.txt | AC | 6 ms | 256 KB |
1_011.txt | AC | 28 ms | 256 KB |
1_012.txt | AC | 35 ms | 256 KB |
1_013.txt | AC | 19 ms | 256 KB |
1_014.txt | AC | 1 ms | 256 KB |
1_015.txt | AC | 47 ms | 256 KB |
1_016.txt | AC | 14 ms | 256 KB |
1_017.txt | AC | 67 ms | 256 KB |
1_018.txt | AC | 66 ms | 256 KB |
1_019.txt | AC | 65 ms | 256 KB |
1_020.txt | AC | 65 ms | 256 KB |
1_021.txt | AC | 66 ms | 256 KB |
1_022.txt | AC | 66 ms | 256 KB |
1_023.txt | AC | 67 ms | 256 KB |
1_024.txt | AC | 67 ms | 256 KB |
1_025.txt | AC | 68 ms | 256 KB |
1_026.txt | AC | 68 ms | 256 KB |
1_027.txt | AC | 86 ms | 256 KB |
1_028.txt | AC | 86 ms | 256 KB |
1_029.txt | AC | 68 ms | 256 KB |
1_030.txt | AC | 67 ms | 256 KB |
1_031.txt | AC | 67 ms | 256 KB |
1_032.txt | AC | 67 ms | 256 KB |
1_033.txt | AC | 67 ms | 256 KB |
1_034.txt | AC | 67 ms | 256 KB |
1_035.txt | AC | 70 ms | 256 KB |