結果

問題 No.328 きれいな連立方程式
ユーザー mayoko_mayoko_
提出日時 2015-11-08 19:19:10
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 1,021 bytes
コンパイル時間 907 ms
コンパイル使用メモリ 84,084 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 14:10:26
合計ジャッジ時間 1,748 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
//#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
//#include<list>
#include<queue>
#include<deque>
#include<algorithm>
//#include<numeric>
#include<utility>
#include<complex>
//#include<memory>
#include<functional>
#include<cassert>
#include<set>
#include<stack>

const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll c1, c2, c3, c4;
    cin >> c1 >> c2 >> c3 >> c4;
    assert(-5000 <= c1 && c1 <= 5000);
    assert(-5000 <= c2 && c2 <= 5000);
    assert(-5000 <= c3 && c3 <= 5000);
    assert(-5000 <= c4 && c4 <= 5000);
    ll a = c1*c4-c2*c3;
    ll b = (c3*c1-c2*c2) * (c3*c3-c2*c4);
    assert(a+4*b != 0);
    if (a+4*b > 0) cout << "R" << endl;
    else cout << "I" << endl;
    return 0;
}
0