![](https://img-blog.csdnimg.cn/2020041402051843.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
ICPC-问题与代码
ICPC的问题与代码,包括转载的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
687A: NP-Hard Problem
Codeforces Round #360 Editorial [+ Challenges!]A. NP-Hard Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecentl转载 2016-07-02 08:29:17 · 1289 阅读 · 0 评论 -
POJ1011 HDU1455 UVA307 UVALive5522 Sticks题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#include#includeusing namespace std;//dfs 判断是否okint a[100],n,vis[100],L,last;//dfs+剪枝//1-对拼接到一半发现不能拼接-保留-寻找 //2-bool dfs(int m,int l)//还剩下棍子转载 2018-02-06 22:31:21 · 460 阅读 · 0 评论 -
HDU1642 UVA167 UVALive5227 The Sultan's Successors题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#includeusing namespace std;//八皇后+回溯 int ans;int C[8];int boards[8][8],vis[3][2*8]; void search(int cur)//问题只要求八个 cur行i列 { if(cur==8)转载 2018-02-06 22:36:18 · 439 阅读 · 0 评论 -
POJ2258 ZOJ1947 UVA539 The Settlers of Catan题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#includeusing namespace std;const int N=26;int n,m,ans;int map[N][N],vis[N][N];//回溯暴力搜索void search(int cur,int len){ ans=max(ans,len); for转载 2018-02-06 22:40:11 · 472 阅读 · 0 评论 -
POJ1209 UVA158 Calendar题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#include#include#include#include using namespace std;struct event{ int t,r,d,m;// int id; char name[300]; bool operator<(const event &pos转载 2018-02-06 21:44:57 · 681 阅读 · 0 评论 -
POJ3080 ZOJ2784 UVALive3628 Blue Jeans题解
代码来源:TYUT_YancyKahnAC的C++语言程序如下:#include <iostream>#include <cstring>#include <cstdio>using namespace std;const int MAXN = 62;const int INF = 0x3ffffff;string key[11];int ne...转载 2018-02-12 17:21:54 · 426 阅读 · 0 评论 -
UVA11991 Easy Problem from Rujia Liu?题解
代码来源:TYUT_YancyKahnAC的C++语言程序如下:#include <iostream>#include <cstdio>#include <cstring>#include <vector>using namespace std;const int MAXM = 1000000;vector<int> vec...转载 2018-02-12 17:27:59 · 332 阅读 · 0 评论 -
POJ2083 ZOJ3507 Fractal题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#include#includeusing namespace std;int n,sum;//3^6=729const int N=1000;char vis[N][N];void B(int num,int x,int y){ if(num==1) vis[x][y]转载 2018-02-07 08:04:25 · 881 阅读 · 0 评论 -
POJ1040 HDU1456 UVA301 UVALive5516 Transportation题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#include#include#includeusing namespace std;const int N=25;//maximum 22 orders,p<=7int n,p,t;int ans;int cap[8],vis[N];struct order{ int st转载 2018-02-07 17:21:49 · 519 阅读 · 1 评论 -
POJ1315 UVA639 UVALive5325 Don't Get Rooked题解
代码来源:DeathYmzAC的C++语言程序如下:#include#include#include#includeusing namespace std;const int N=10;int n,ans;char board[N][N];int vis[N][N];void f(int i,int j,int v){ vis[i][j]+=v; for(i转载 2018-02-07 17:24:40 · 421 阅读 · 0 评论 -
UVA750 UVALive5358 8 Queens Chess Problem题解
代码来源:DeathYmzAC的C++语言程序如下:#include<iostream>#include<cstdio>#include<cstring>//很坑很坑的输出 !!!!! using namespace std;const int N=8;int n,top;int x,y;int C[N],vis[3][2*N]; void s...转载 2018-02-08 09:13:42 · 1126 阅读 · 0 评论 -
POJ2260 ZOJ1949 UVA541 Error Correction题解
代码来源:DeathYmzAC的C++语言程序如下:#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int N=100;int matrix[N][N];int row[N],col[N];int main(){ int n; while...转载 2018-02-20 23:45:33 · 388 阅读 · 0 评论 -
POJ1029 UVA158 Calendar题解
代码来源:吴永辉《数据结构编程实验》的随书文档。Pascal语言程序如下:program calendar;CONST prob_id = 'C'; file_id = 'PROBLEM';type Str255 = string; EventPtr = ^EventRecord; EventRecord = record fDay,转载 2018-02-01 16:46:07 · 648 阅读 · 0 评论 -
POJ1060 HDU1343 ZOJ1026 UVALive2323 Modular multiplication of polynomials题解
代码来源:DeathYmzAC的C++语言程序如下:#include<cstdio>#include<iostream>#include<cstring>using namespace std;const int maxn=1100;int f[maxn],g[maxn],h[maxn];int e[2*maxn];int s[2*maxn];i...转载 2018-02-11 23:01:29 · 496 阅读 · 0 评论 -
POJ1555 ZOJ1720 UVA392 UVALive5309 Polynomial Showdown题解
代码来源:DeathYmzAC的C++语言程序如下:#include<iostream>#include<cstdio>#include<cstring>#include<cmath>using namespace std;//水题写的很碎emmmm一开始没有构思好 考虑全面就好 const int N=8; int main(){...转载 2018-02-11 22:57:38 · 450 阅读 · 0 评论 -
687C: The values you can make
Codeforces Round #360 Editorial [+ Challenges!]C. The Values You Can Maketime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputst转载 2016-07-03 06:22:35 · 1257 阅读 · 0 评论 -
687D: Dividing Kingdom II
Codeforces Round #360 Editorial [+ Challenges!]B. Lovely Palindromestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPari转载 2016-07-03 06:38:11 · 916 阅读 · 0 评论 -
687E: TOF
Codeforces Round #360 Editorial [+ Challenges!]E. TOFtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToda转载 2016-07-03 06:41:51 · 1004 阅读 · 0 评论 -
688A: Opponents
Codeforces Round #360 Editorial [+ Challenges!]A. Opponentstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output转载 2016-07-01 11:36:12 · 1223 阅读 · 0 评论 -
688B: Lovely Palindromes
Codeforces Round #360 Editorial [+ Challenges!]B. Lovely Palindromestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outpu转载 2016-07-01 12:33:18 · 1380 阅读 · 0 评论 -
687B: Remainders Game
Codeforces Round #360 Editorial [+ Challenges!]B. Remainders Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outp转载 2016-07-02 09:03:01 · 912 阅读 · 0 评论 -
UVA11038 How Many O's?题解
原文链接:http://www.algorithmist.com/index.php/User:Sweepline/UVa_11038.cppAC的C++语言程序如下:// C++ solution for problem 11038 - "How Many 0's"#include #include #include using namespace std; //转载 2018-01-16 22:06:58 · 607 阅读 · 0 评论 -
UVA10735 Euler Circuit题解
原文链接:http://www.algorithmist.com/index.php/User:Sweepline/UVa_10735.cppAC的C++语言程序:/* UVa 10735: find euler tour in a mixed graph */#include #include #include using namespace std; i转载 2018-01-16 21:47:56 · 534 阅读 · 0 评论 -
UVA10978 Let's Play Magic! 题解
原文链接:http://www.algorithmist.com/index.php/User:Sweepline/UVa_10978.cppAC的C语言程序:#include #include int main(){ char card[64][64], word[64][64], *order[64]; int i, j, k, n; while (sc转载 2018-01-16 21:57:39 · 623 阅读 · 1 评论 -
UVA10909 Lucky Number题解
原文链接:http://www.algorithmist.com/index.php/User:Sweepline/UVa_10909.cppAC的C++语言程序:/* * Solution for problem 10909 'Lucky Number'. * * The code uses a (simple) binary search tree to转载 2018-01-16 21:51:46 · 611 阅读 · 0 评论 -
UVA10523 Very Easy !!!题解
代码来源:DeathYmzAC的C++语言程序如下:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;const int maxn=10010;const int b...转载 2018-02-09 18:06:48 · 1233 阅读 · 0 评论 -
POJ2246 HDU1082 ZOJ1094 UVA442 Matrix Chain Multiplication题解
代码来源:DeathYmzAC的C++语言程序如下:#include<iostream>#include<cstdio>#include<cstring>#include<stack>using namespace std;struct matrix{ int r,c;};stack<matrix> s;int main...转载 2018-02-20 23:49:32 · 373 阅读 · 0 评论