自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 UVa 10474 Where is the Marble?

挺简单的一道题,直接AC 用的是理扑克牌式的sorting方法,效率并不高,用时比较长 #include #include void sorting(int* in, int N); using namespace std; const int maxn = 10004; int in[maxn], fi[maxn]; int main() { int N, Q; int count =

2017-07-05 21:45:27 134

原创 UVa 1590 IP Networks

这是一道水题 然而wa无数遍 忘了写读取数据的循环 忘了写了循环后需要每次memset 忘了memset需要cstring头文件 没看到题目n的上限是1000 。。。 我就是个渣渣。。。 然而最后ac了呀,ac了呀。。 位操作可以轻松用于2进制转换 #include #include #include int in[1002][5], in2[1002][40], ans1[4

2017-06-12 17:59:59 201

原创 UVa 253 Cube painting

正常思路应该是列举所有的旋转情况再做判断 我的思路比较清奇。。。因为16,25,34相对,就像先把串分成两组,表示相对的2个顶点,将一个角与前面一一对应后再比较对面是否一样。 写起来也比较长?? //Cube painting #include char a[7], b[7]; int compare(int i, int j, int k); int check(int i, int j

2017-06-03 15:42:14 163

原创 UVa 220 Othello

这个题的思路也比较清晰,依然花了1个小时才把代码写出来,好在bug不多 //Othello #include #include using namespace std; char b[10][10]; int check(char type,int x,int y); char* move(int dir, int num,int x,int y); void M(char type, int

2017-06-03 11:01:28 237

原创 UVa 201 Squares

终于有一个简单题了,没话说 #include #include using namespace std; int H[10][10], V[10][10]; int ans[10]; int check(int i,int j,int n); int check(int i, int j, int n) { for (int m = i; m < i + n; m++) if (V[m][

2017-05-29 16:32:08 219

原创 UVa 512 Spreadsheet Tracking

题目意思就是对电子表格进行一系列操作后追踪各cell的去向,基本操作类型有EX DR DC IR IC 5种,关键是设计简单的基本操作函数。 sample input 7 9 5 DR 2 1 5 DC 4 3 6 7 9 IC 1 3 IR 2 2 4 EX 1 2 6 5 4 4 8 5 5 7 8 6 5 0 0 sample output Sp

2017-05-22 16:25:47 185

原创 UVa 213 Message Decoding

输入部分包含两部分,编码头和一串code,注意序列与编码头的对应关系中,序列有着很强的分段规律性,所以选择二维数组code储存,最后解码时直接输出对应code元素即可。 源码如下 #include #include const int maxn = 80; char code[8][1 << 8]; void readchar(); int readint(int c); int main()

2017-05-22 16:03:05 180

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除