ZOJ-2947
来源:互联网 发布:淘宝卖家密码修改 编辑:程序博客网 时间:2024/04/25 22:57
#include<stdio.h>#include<stdlib.h>#include<string.h>int main(){ int n; scanf("%d", &n); while (n--) { int a, b; char *s1, *s2, s[10]; scanf("%d", &a); s1 = (char *) malloc(a + 1); *(s1 + a) = '\0'; while (a--) { scanf("%s", s); *(s1 + a) = s[0]; } scanf("%d", &b); s2 = (char *) malloc(b + 1); *(s2 + b) = '\0'; while (b--) { scanf("%s", s); *(s2 + b) = s[0]; } printf(strcmp(s1, s2) ? "DIFFERENT\n" : "SAME\n"); free(s1); free(s2); } return 0;}
0 0
- zoj 2947
- zoj 2947
- zoj 2947
- ZOJ-2947
- ZOJ 2947
- zoj 2947 Abbreviation 水题
- zoj 2947 Abbreviation
- ZOJ 2947 Abbreviation
- ZOJ 2947 Abbreviation
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- 我这一年写的博文
- Hadoop2.2.0的Eclipse插件
- POJ 1039 Pipe
- spring事务的传播特性
- 机器学习与数据挖掘基本算法初步介绍
- ZOJ-2947
- 未分类--Windows API--CIDLData_CreateFromIDArray
- 系统辅助工具
- html学习-day02:div布局与css控制
- 关于unix domain socket的一个文章
- 小结
- django session xxx is not JSONSerializer
- Mathematics for 3D Game Programming and Computer Graphics - Rotation Transforms About Arbitrary Axis
- [IOS]页面跳转 相关