在线判题 (模拟)http://202.196.1.132/problem.php?id=1164
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#define N 200010 void input(char s[])
{
char str[N] = {};
while(gets(str), strcmp(str, "START"));/****/
while(gets(str), strcmp(str, "END"))/****/
{
if(str[] == )
strcat(s, "\n");
else
strcat(s, str);
}
}//读入 void del(char s[])
{
int i, j = ;
char s1[N] = {};
for(i = ; s[i] != '\0' ; i++)
{
if(s[i] != ' ' && s[i] != '\t' && s[i] != '\n')
s1[j++] = s[i];
}
s1[j + ] = '\n';
strcpy(s, s1);
}//删除空格,制表符,回车 int judge(char a[], char b[])
{
if(strcmp(a, b) == )
return ;
del(a);
del(b);
if(strcmp(a, b) == )
return ;
return ;
}//判断
int main()
{
int n, i, m;
char s1[N], s2[N];
scanf("%d", &n);
for(i = ; i < n ; i++)
{
memset(s1, , sizeof(s1));
memset(s2, , sizeof(s2));
input(s1);
input(s2);
m = judge(s1, s2);
if(m == )
printf("Accepted\n");
else if(m == )
printf("Presentation Error\n");
else
printf("Wrong Answer\n");
}
return ;
}
在线判题 (模拟)http://202.196.1.132/problem.php?id=1164的更多相关文章
- 在线判题系统hustoj的搭建
摘要:ACM/ICPC程序设计竞赛,越来越受到各个高校的重视,是程序设计竞赛中的奥林匹克.Hustoj是搭建在linux系统上的判题系统.能够判断代码的正确性.会及时返回通过或者不通过,如果不通过会返 ...
- 牛客网在线判题系统JavaScript(V8)使用
JavaScript作为一种弱类型的编程语言,语法和C/C++.JAVA等存在差别,但是对于大部算法题,不只是C/C++.JAVA,也依然可以使用JavaScript来实现.所以在牛客网中,如果你喜欢 ...
- ZZNU 1163: 在线判题(指针专题)
题目描述 Ignatius is building an Online Judge, now he has worked out all the problems except the Judge S ...
- YC大牛的判题任务-想法
YC大牛的判题任务 Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java class ...
- NOIp2017真题模拟赛 By cellur925
果然我还是最菜的==不接受反驳 (先考了day2喵喵喵) Day2 T1:奶酪 期望得分:100分 实际得分:100分 考察:并查集 思路:这题其实之前做过了==.思路还是比较清晰的,读入时预处理出可 ...
- ACM: NBUT 1105 多连块拼图 - 水题 - 模拟
NBUT 1105 多连块拼图 Time Limit:1000MS Memory Limit:65535KB 64bit IO Format: Practice Appoint ...
- indeed2017校招在线编程题(网测)三
A. Calculate Sequence 分析:就是斐波那契递推公式,但是初始值是指定的,只用求第10个数,数据范围和复杂度都比较小,直接写. B. 忘了叫啥了. 就是有a-j十个字符组成的字符串, ...
- Sdut 2409 The Best Seat in ACM Contest(山东省第三届ACM省赛 H 题)(模拟)
题目描述 Cainiao is a university student who loves ACM contest very much. It is a festival for him once ...
- hdu 4706 Children's Day 2013年ICPC热身赛A题 模拟
题意:按字母顺序排列成n型,简单的模拟题. 当字母排到z时从a开始重新排起. 代码: /* * Author: illuz <iilluzen[at]gmail.com> * Blog: ...
随机推荐
- java导出excel报表
1.java导出excel报表: package cn.jcenterhome.util; import java.io.OutputStream;import java.util.List;impo ...
- 修练8年C++面向对象程序设计之体会
http://pcedu.pconline.com.cn/empolder/gj/c/0504/609482_1.html
- Servlet错误一览
错误:HTTP Status 405 - HTTP method POST is not supported by this URL 原因:没有提供doPost方法 错误:控制器跳转到空白界面 原因: ...
- sql Server 的基本函数
--聚合函数 use pubs go select avg(distinct搜索 price) --算平均数 from titles where type='business' go use pubs ...
- LA 5009 (三分法求极值) Error Curves
给出的曲线要么是开口向上的抛物线要么是直线,但所定义的F(x)的图形一定是下凸的. 注意一点就是求得是极小值,而不是横坐标,样例也很容易误导人. #include <cstdio> #in ...
- 用RSA加密实现Web登录密码加密传输
通常我们做一个Web应用程序的时候都需要登录,登录就要输入用户名和登录密码,并且,用户名和登录密码都是明文传输的,这样就有可能在中途被别人拦截,尤其是在网吧等场合. 这里顺带一个小插曲,我以前有家公司 ...
- 用户输入 i. 检测常用手势(一)
参考: http://blog.csdn.net/qq418716640/article/details/8508973http://www.cnblogs.com/mengdd/p/3335508. ...
- javascript实现继承的一种方式
function extend(Child, Parent) { var F = function(){}; F.prototype = Parent.prototype; Child.prototy ...
- 我的c语言经历
作为一名计算机专业的学生,c语言是我的启蒙编程语言.当时,是刘慧老师带的课.很庆幸,是刘老师带的课.因为,后来当我这个人有了一些经历就会知道.对于像一张 白纸一样的大一新生.老师,如果能给学生很好的启 ...
- Java [Leetcode 268]Missing Number
题目描述: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is ...