I used DP instead of Greedy. But got WA on PoJ, though it passed all web-searched cases. Maybe I have to use Greedy. BTW: a careless modification introduced an error, and it took me 1+ hours to debug. DETAILS Sth. about this DP solution: dp[iLake][nC…
Labeling Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12466 Accepted: 3576 Description Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that: No two balls share…
A Dicey Problem Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 832 Accepted: 278 Description The three-by-three array in Figure 1 is a maze. A standard six-sided die is needed to traverse the maze (the layout of a standard six-sided d…
数据测试了好几个都没问题,可以就是WA不让过,检测了2个小时还是没发现有什么问题T_T!!求高手看看代码,小弟在此谢谢各位哦! #include <stdio.h> #include <stdlib.h> #define max 1000 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int…
http://acm.tzc.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=3709 You are playing one game called "Number Maze". The map of an example is shown in the following figure. In the map, there are N*N+2 cells. When the game starts, you…
上次那个大数开方的高精度的题,UVa113 Power of Cryptography,直接两个double变量,然后pow(x, 1 / n)就A过去了. 怎么感觉UVa上高精度的题测试数据不给力啊... 话说回来,我写了100+行代码,WA了,后来考虑到要忽略前导0,又WA了,实在不知道哪出问题了. Overflow Write a program that reads an expression consisting of twonon-negative integer and an…
蜜汁wa,蜜汁wa,少了个\n------ #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; const double eps=1e-5; const double pi=acos(-1.0); const int mod=998244353; const int INF=0x3f3f3f3f; const int N=155; double a[…