Contest Duration: ~ (local time) (90 minutes) Back to Home

Submission #243642

Source Code Expand

Copy
```#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <queue>

#pragma warning( disable: 4996 )

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define INF 1000000000
#define EPS 1e-10

#define MAX_A 300000
#define MAX_B 300000

#define MAX_N 5000

#define PI (atan(1.0) * 4.0)

int A, B;
int N;
int C[MAX_N];
int D[MAX_N];

int main() {

cin >> A >> B;

if (A > B)
swap(A, B);

cin >> N;

for (int i = 0; i < N; i++){
cin >> C[i] >> D[i];
if (C[i] > D[i])
swap(C[i], D[i]);
}

for (int i = 0; i < N; i++){

if ((A <= C[i] && B <= D[i]) || (A <= D[i] && B <= C[i])){
cout << "YES" << endl;
continue;
}

double lb = 0, ub = PI / 2;

bool flag = false;

while (ub - lb > EPS){
double rad = (ub + lb) / 2;
if (h < D[i])
else
}
double rad = (ub + lb) / 2;
if (C[i] - d >= 0.01)
cout << "YES" << endl;
else
cout << "NO" << endl;

}

return 0;
}```

#### Submission Info

Submission Time 2014-10-02 00:35:31+0900 B - 高橋君と禁断の書 taketake0609 C++ (G++ 4.6.4) 100 1483 Byte AC 82 ms 952 KB

#### Test Cases

Set Name Score / Max Score Test Cases
Case Name Status Exec Time Memory