A + B Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 308484 Accepted Submission(s): 59635 Problem Description I have a very simple problem for you. Given two integers A and B, yo…
A simple problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3702 Accepted Submission(s): 1383 Problem Description Zty很痴迷数学问题..一天,yifenfei出了个数学题想难倒他,让他回答1 / n.但Zty却回答不了^_^. 请大家编程帮助他. Input 第一行…
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int m; void Floyd() { int i, j, k; for (k=1;k<=m;k++) { for (i=1;i<=m;i++) { for (j=1;j<=m;j++) { if (g…
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int m; int Dijkstra(int s,int t) { bool visit[1005]; int dis[1005]; for(int i = 1; i <= m; ++i) { visit[i] =…
for the backtracking part, thanks to the video of stanford cs106b lecture 10 by Julie Zelenski for the nice explanation of recursion and backtracking, highly recommended. in hdu 2553 cout N-Queens solutions problem, dfs is used. // please ignore, bel…
H - Solve this interesting problem Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5323 Appoint description: System Crawler (2015-07-28) Description Have you learned something about segment tr…
Train Problem I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 25029 Accepted Submission(s): 9445 Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays…
The 3n + 1 problem Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 53927 Accepted: 17142 Description Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In th…
Sum Problem Time Limit: 1000/500 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 338086 Accepted Submission(s): 85117 Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this pro…
A + B Problem Too Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13465 Accepted Submission(s): 10008 Problem Description This problem is also a A + B problem,but it has a little difference,…