結果
問題 |
No.2953 Maximum Right Triangle
|
ユーザー |
|
提出日時 | 2024-11-08 22:01:09 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 888 bytes |
コンパイル時間 | 5,899 ms |
コンパイル使用メモリ | 335,260 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 22:01:16 |
合計ジャッジ時間 | 6,403 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using mint = modint998244353; using ll = long long; using ull = unsigned long long; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) using namespace chrono; random_device rnd; mt19937 mt(rnd()); int RandInt(int a, int b) { return a + mt() % (b - a + 1); } const int dx[4] = {0, 1, 0, -1}; const int dy[4] = {1, 0, -1, 0}; int t; int main(){ cin>>t; while(t--){ ll d,x,y; cin>>d>>x>>y; ll x2,y2; x2=x-y; y2=x+y; if(x2<0){ x2=-x2; y2=-y2; } if(y2<0){ x2=-x2; y2=-y2; } ll ans; //外積 ans=abs(x2*y-y2*x); if(0<=x2&&x2<=d&&0<=y2&&y2<=d){ cout<<ans<<endl; }else{ cout<<0<<endl; } } }