![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
紫书第四章习题
Dilly__dally
这个作者很懒,什么都没留下…
展开
-
紫书UVA 213
此题如题号213。。注意输入就行了。#include<iostream> #include<cstring> using namespace std; int code[8][1<<8]; int readchar() { for(;;) { int ch=getchar(); if(ch!='\n'&&ch!='\r') ret...原创 2018-04-08 13:30:32 · 117 阅读 · 0 评论 -
紫书UVA253
模拟的一个水题,然而我花了两天,各种WA,最终借鉴了大神的思路和代码AC了。/*The input of your program is a textfile that ends with the standard end-of-file marker. Each line is a string of 12 characters. The first 6 characters of this s...原创 2018-04-10 20:36:44 · 129 阅读 · 0 评论 -
紫书UVA 489
第一篇博客,虽然是个水题,但对我这种小白还是挺艰难的。思路难点是对已经查过的字符的标记。此题要注意:猜已经猜过的字母也算错题目:https://vjudge.net/problem/UVA-489AC代码:#include<iostream> #include<cstring> using namespace std; char s[1000],s1[1000]; int ...原创 2018-04-07 00:13:40 · 124 阅读 · 0 评论 -
紫书 UVA133
循环模拟的水题,类似约瑟夫环,主要难点是判断到达界限然后取模。题目很坑,注意开始p1=n-1,p2=0,当停到某个下标时应从 下一个下表数起我的思路如下#include<iostream> using namespace std; int n,k,m,a[25]; int go(int p,int d,int t) { while(t--) { /*while(a[p]...原创 2018-04-07 02:15:42 · 134 阅读 · 0 评论