zoukankan      html  css  js  c++  java
  • 2840 WIKIOI——评测

    2840 WIKIOI——评测

     

    时间限制: 1 s
    空间限制: 2000 KB
    题目等级 : 白银 Silver
     
     
     
    题目描述 Description

    Wikioi上有一题有N个测试点,时限为Kms。

    给出某用户的答案及标准答案,用户用时,求该用户的测试结果

    (AC,WA或TLE)。

    若没有错误答案时有超时,才算作TLE。

    输入描述 Input Description

    第1行,N,K。

    之后N行,用户答案,标准答案,用时。

    输出描述 Output Description

    结果

    样例输入 Sample Input

    3 100

    ABC  ABD  50

    AB AB 10

    ABSTGDH ABSTGDH 120

    样例输出 Sample Output

    WA

    数据范围及提示 Data Size & Hint

    N<=100,K<=10000.

    分类标签 Tags

     1 #include<iostream>
     2 #include<cstdio>
     3 #include<cstring>
     4 using namespace std;
     5 int tot;
     6 int main()
     7 {
     8     int n,maxtime;
     9     scanf("%d%d",&n,&maxtime);
    10     for(int i=1;i<=n;i++)
    11     {
    12         string a,b;
    13         cin>>a>>b;
    14         if(a!=b){printf("WA");return 0;}
    15         int time;
    16         cin>>time;
    17         if(time>tot)tot=time;
    18     }
    19     if(tot>maxtime)printf("TLE");
    20     else printf("AC");
    21     return 0;
    22 }
  • 相关阅读:
    Gym
    [APIO2014] 回文串
    python选课系统
    python面向对象之类成员修饰符
    python面向对象之类成员
    python的shelve模块
    python的re模块
    python的configparser模块
    python的sys和os模块
    python的hashlib模块
  • 原文地址:https://www.cnblogs.com/zwfymqz/p/6773373.html
Copyright © 2011-2022 走看看