Submission #21717021


Source Code Expand

/** author: samari06,  created: 12.04.2021 19:57:00 **/
#include <bits/stdc++.h>
#define REP(i, N) for(int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;

int main(){
    ll r,x,y;
    cin >> r >> x >> y;
  
    if(x == 0 && y == 0){
    	puts("0");
        return 0;
    }
    if(r*r > x*x + y*y){
    	puts("2");
        return 0;
    }
    
    
    for(ll i = 1; i*r < 200000; i++){
        if(i*r*i*r >= x*x + y*y){
            cout << i;
        }else continue;
        break;
    }


    return 0;
}

Submission Info

Submission Time
Task C - Compass Walking
User samari06
Language C++ (GCC 9.2.1)
Score 300
Code Size 555 Byte
Status AC
Exec Time 6 ms
Memory 3636 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 34
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_31.txt, random_32.txt, random_33.txt, random_34.txt, random_35.txt, random_36.txt, random_37.txt, random_38.txt, random_39.txt, random_40.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 6 ms 3568 KiB
hand_02.txt AC 2 ms 3408 KiB
random_01.txt AC 2 ms 3568 KiB
random_02.txt AC 3 ms 3592 KiB
random_03.txt AC 2 ms 3552 KiB
random_04.txt AC 2 ms 3408 KiB
random_05.txt AC 2 ms 3588 KiB
random_06.txt AC 2 ms 3596 KiB
random_07.txt AC 2 ms 3524 KiB
random_08.txt AC 3 ms 3584 KiB
random_09.txt AC 2 ms 3408 KiB
random_11.txt AC 2 ms 3636 KiB
random_12.txt AC 2 ms 3448 KiB
random_13.txt AC 2 ms 3592 KiB
random_14.txt AC 2 ms 3548 KiB
random_15.txt AC 4 ms 3396 KiB
random_16.txt AC 2 ms 3620 KiB
random_17.txt AC 2 ms 3524 KiB
random_18.txt AC 2 ms 3624 KiB
random_19.txt AC 3 ms 3624 KiB
random_20.txt AC 2 ms 3408 KiB
random_31.txt AC 2 ms 3568 KiB
random_32.txt AC 2 ms 3440 KiB
random_33.txt AC 2 ms 3408 KiB
random_34.txt AC 3 ms 3524 KiB
random_35.txt AC 3 ms 3636 KiB
random_36.txt AC 2 ms 3408 KiB
random_37.txt AC 2 ms 3520 KiB
random_38.txt AC 5 ms 3584 KiB
random_39.txt AC 2 ms 3620 KiB
random_40.txt AC 2 ms 3436 KiB
sample_01.txt AC 2 ms 3396 KiB
sample_02.txt AC 2 ms 3584 KiB
sample_03.txt AC 2 ms 3548 KiB