摘要:
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1001一开始的想法是排序后二分搜索,发现会进行非常多不必要的遍历,十分耗时间。解决方法:在得到一对数之后顺便令数组长度进行缩短能够有效减少运行时间。 1 #include 2 #include 3 using namespace std; 4 //int bs(i... 阅读全文
posted @ 2018-04-05 21:02
549
阅读(155)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 5 long long f(long long a,long long b,long long n) 6 { 7 long long t,y; 8 t=1; 9 y=a; 10 while (b!=0) 11 { 12 if (... 阅读全文
posted @ 2018-04-05 17:24
549
阅读(129)
评论(0)
推荐(0)
浙公网安备 33010602011771号