MSBOP 2015 Qualification register

Ended

Participants:7764

比赛已经结束,可以在排名页面查看所有通过的代码,比赛题目可以在题库中继续尝试。

Information

Please use the code you got from the official site to register for the contest.

注意事项:

  1. 系统不会告诉你使用的测试数据是什么,也不会告诉你你的程序的输出是什么。你需要自己思考、查错、修改以通过更多的测试数据获得更多的分数。
  2. 系统不会自动保存代码框中的内容。只有当你点击提交时,才会把代码框中的内容提交到系统上。
  3. 针对同一题目,你可以多次提交程序。具体的排名和得分逻辑请看这里
  4. 只通过标准输入(STDIN)和标准输出(STDOUT)进行输入和输出数据。 您的程序应该通过STDIN读入数据,并通过STDOUT输出数据。请不要访问其他资源例如磁盘文件,可能导致不确定的结果。
  5. 严格依照题目描述的格式输入输出数据。 您的程序应该严格依照题目描述的格式输入输出数据。不符合描述格式的输出会导致系统判定您的程序为Wrong Answer。
  6. 样例输入/输出不包含系统全部的评测数据。 题目中样例输入/输出只是为了编程者能更清楚了解题目的输入输出格式。
  7. 如果你使用Java, 你需要编写一个类名为Main(大小写敏感)的public类,类中包含入口main函数,并且不要使用package。请参考样例题目和程序中的JAVA程序
  8. 请查看下表了解CE/WA/AC/TLE等系统反馈的详细意义:

    评测结果 缩写 含义
    Waiting WT 用户程序正在排队等待测试
    Accepted AC 用户程序输出正确的结果
    Presentation Error PE 用户程序输出有中有多余的空行,或者某行内有多余的空格。
    Time Limit Exceeded TLE 用户程序运行时间超过题目的限制
    Memory Limit Exceeded MLE 用户程序运行内存超过题目的限制
    Wrong Answer WA 用户程序输出错误的结果
    Runtime Error RE 用户程序发生运行时错误
    Output Limit Exceeded OLE 用户程序输出的结果大大超出正确答案的长度
    Compile Error CE 用户程序编译错误
    System Error SE 用户程序不能被评测系统正常运行
    Validator Error VE 用户程序的输出结果导致评测程序非正常退出
    Not Available NA 针对编程之美系列比赛,大数据的结果在比赛结束前不公开,会显示NA。

评测系统参数

OS:
Ubuntu 14.04
GCC:
GNU C 4.8.2
G++:
GNU C++ 4.8.2
Java:
OpenJDK 1.7.0_51
C#:
Mono 3.2.8

样例题目及程序

A+B Problem
描述

Given two integers a and b, calculate their sum a + b.

输入

The input contains several test cases. Each contains a line of two integers, a and b.

输出

For each test case output a+b on a seperate line.

样例输入
1 2
3 4
5 6
样例输出
3
7
11
语言 样例程序
C
#include <stdio.h>
	
int main(void) {
    int a, b;
    while(scanf("%d%d", &a, &b) != EOF) {
    	printf("%d\n", a + b);
    }
    return 0;
}
C++
#include <iostream>
	
using namespace std;

int main(void) {
    int a, b;
    while(cin >> a >> b) {
    	cout << a + b << endl;
    }
    return 0;
}
Java
import java.util.Scanner;
	
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()) {
        	int a = in.nextInt();
        	int b = in.nextInt();
        	System.out.println(a + b);
        }
    }
}
C#
using System;

public class AplusB
{
    private static void Main()
    {
        string line;
        while((line = Console.ReadLine()) != null)
        {
            string[] tokens = line.Split(' ');
            Console.WriteLine(int.Parse(tokens[0]) + int.Parse(tokens[1]));
        }
    }
}