ZOJ-1394
2013-12-16 11:22
309 查看
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); while (!"ENDOFINPUT".equals(line.trim())) { while ("START".equals(line.trim())) { String s = sc.nextLine(); while (!"END".equals(s)) { System.out.println(caculate(s)); s = sc.nextLine(); } line = sc.nextLine(); } } } static String caculate(String line) { String[] ss = line.split(" "); int x = Integer.parseInt(ss[0]); int y = Integer.parseInt(ss[1]); int z = Integer.parseInt(ss[2]); int angle = z > 180 ? 360 - z : z; double distance = 3.14159 * x * angle / 90; int travel = y * 5; if (travel >= distance) return "YES " + (int) ((travel - distance) / 5); else return "NO " + travel; } }
相关文章推荐
- zoj 1394 Polar Explorer
- ZOJ 1394 Polar Explorer
- zoj 1484 || hdu 1394 Minimum Inversion Number
- zoj 1394 Polar Explorer
- hdu 1394 zoj 1484 求旋转序列的逆序数(并归排序)
- ZOJ 1394 外星人探索
- ZOJ 1394 Polar Explorer
- hdu 1394 zoj 1484 求旋转序列的逆序数(并归排序)
- HDU 1394 & ZOJ 1484 Minimum Inversion Number
- ZOJ Problem Set - 1394 Polar Explorer
- ZOJ 1394 Polar Expoler
- HDU 1394 & ZOJ 1484 Minimum Inversion Number
- ZOJ 1484 HDU 1394 Minimum Inversion Number / 线段树单点更新
- zoj 1045 HangOver
- ZOJ-1514
- ZOJ 1292/HDU 1047 Integer Inquiry
- (线段树)hdoj1394-Minimum Inversion Number 逆序对
- ZOJ 1649 Rescue BFS水题
- ZOJ-1760
- zoj 3487 Ordinal Numbers