描述:水題,不解釋#include <cstdio>#include <cstdlib>int num[100010];int main(){ //freopen("a.txt","r",stdin); int n; while(scanf("%d",&n)!=EOF) { if(!n) break; unsigned long long int sum=0; for(int i=0;
精度這個東西好神奇~如果判斷一個double的數大於0,直接讓這個double跟一個很小的數的負數比較大小~!!!!!!!!!#include<cstdlib>#include<iostream>#include<cstdio>#include<cmath>#include<set>#include<cstring>#include <algorithm>#define N 10005#define MIN
#include <cstdio>long int xx(int x){ long long int sum(0); for(int y=1; y<=x; y++) sum+=y*y*y*y; return sum;}long int xxx(int x){ long long int sum(0); for(int y=1; y<=x; y++) sum+=y; return sum;}int main()
The Rotation GameTime Limit: 15000MS Memory Limit: 150000KTotal Submissions: 3819 Accepted: 1262DescriptionThe rotation game uses a # shaped board, which can hold 24 pieces of square blocks (see Fig.1). The blocks are marked with symbols 1, 2 and 3,
Telephone LinesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3468 Accepted: 1245DescriptionFarmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of the
#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<queue>#include<stack>#include<map>#include<algorithm>using namespace std;const int MAXE=10000002;const int MAX=20009;int vis[10