Submission #21680849


Source Code Expand

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pf push_front
#define ft first
#define sec second
#define pr pair<int,int>
#define ISCC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
ll t ,n ,m ,r ,x ,y ,ans ,dis2;
double dis;
string s;
int main() 
{	
	cin >> r >> x >> y;
	x*=100; y*=100; r*=100;
	dis = sqrt(x*x+y*y);
	dis2 = dis;
	if(dis<1.0*r){cout << 2; return 0;} 	
	ans = dis/(1.0*r)+1; 
	if(1.0*dis2==dis && dis2%r==0) ans--;
	cout << ans;
	return 0;	
}

Submission Info

Submission Time
Task C - Compass Walking
User ck1080012
Language C++ (GCC 9.2.1)
Score 300
Code Size 533 Byte
Status AC
Exec Time 6 ms
Memory 3612 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 3456 KiB
hand_02.txt AC 2 ms 3528 KiB
random_01.txt AC 2 ms 3472 KiB
random_02.txt AC 2 ms 3400 KiB
random_03.txt AC 5 ms 3484 KiB
random_04.txt AC 4 ms 3528 KiB
random_05.txt AC 2 ms 3608 KiB
random_06.txt AC 2 ms 3484 KiB
random_07.txt AC 2 ms 3396 KiB
random_08.txt AC 3 ms 3412 KiB
random_09.txt AC 3 ms 3396 KiB
random_11.txt AC 1 ms 3532 KiB
random_12.txt AC 3 ms 3488 KiB
random_13.txt AC 2 ms 3484 KiB
random_14.txt AC 2 ms 3528 KiB
random_15.txt AC 2 ms 3584 KiB
random_16.txt AC 4 ms 3456 KiB
random_17.txt AC 3 ms 3492 KiB
random_18.txt AC 2 ms 3520 KiB
random_19.txt AC 2 ms 3524 KiB
random_20.txt AC 2 ms 3528 KiB
random_31.txt AC 2 ms 3408 KiB
random_32.txt AC 3 ms 3468 KiB
random_33.txt AC 3 ms 3480 KiB
random_34.txt AC 2 ms 3612 KiB
random_35.txt AC 2 ms 3480 KiB
random_36.txt AC 2 ms 3532 KiB
random_37.txt AC 1 ms 3480 KiB
random_38.txt AC 2 ms 3492 KiB
random_39.txt AC 1 ms 3468 KiB
random_40.txt AC 2 ms 3476 KiB
sample_01.txt AC 4 ms 3492 KiB
sample_02.txt AC 2 ms 3520 KiB
sample_03.txt AC 2 ms 3408 KiB