1349: [Baltic2006]Squint Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 427 Solved: 248[Submit][Status][Discuss] Description Write a program to calculate integer square roots. Input The input is read from a text file named squint.in. Its only line co…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
1349 - Optimal Bus Route Design Time limit: 3.000 seconds A big city wants to improve its bus transportation system. One of the improvement is to add scenic routes which go es through attractive places. Your task is to construct a bus-route-plan for…
原题链接:http://ac.jobdu.com/problem.php?pid=1349 二分.. #include<algorithm> #include<iostream> #include<cstdlib> #include<cstdio> using std::lower_bound; using std::upper_bound; ; int arr[Max_N]; int main() { #ifdef LOCAL freopen("…
1349: Taking Pebbles Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 233 Solved: 141 Description There is a pile of N pebbles initially. Alice and Bob are playing a taking pebbles game as follows: Alice and…
题目链接:1349: TLE Description WH在刷题时,设计出了如下代码: #include<stdio.h> int main() { int i, j, cnt, k, N, K, a[5555]; scanf("%d%d", &N, &K); int ans = 0; for (i = 1; i <= N; i++) { scanf("%d", &a[i]); // 输入N个数 } for (i = 1;…
1349. 最大公约数 (Standard IO) Time Limits: 1000 ms Memory Limits: 65536 KB Description 小菜的妹妹小诗就要读小学了!正所谓计算机要从娃娃抓起,小菜决定在幼儿园最后一段轻松的时间里教妹妹编程. 小菜刚教完gcd即最大公约数以后,一知半解的妹妹写了如下一段代码: sum:=0; for i:=1 to n-1 do for j:=i+1 to n do sum:=sum+gcd(i,j) 显然这个程序的效率是很低的,小明打…
Discription Here is a farm. Here is a farmer that counts how many animal live in his farm: a camels, b sheep, c green cockroaches. Occurs that a n + b n = c n. n is given. You are to find all the rest. Input n (0 ≤ n ≤ 100) Output Three different int…