Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:加减乘除都不用就把这题AC了!

Posted by nan5515522 at 2014-06-26 22:15:51 on Problem 1000
In Reply To:加减乘除都不用就把这题AC了! Posted by:nan5515522 at 2014-05-26 21:06:14
打表水过,人生真是太hard了!
#include <iostream>
#include <algorithm>
#include <cstdio>
#include<queue>
#include<vector>
using namespace std;

int res[11][11] = {{0,1,2,3,4,5,6,7,8,9,10},
	               {1,2,3,4,5,6,7,8,9,10,11},
	               {2,3,4,5,6,7,8,9,10,11,12},
	               {3,4,5,6,7,8,9,10,11,12,13},
	               {4,5,6,7,8,9,10,11,12,13,14},
	               {5,6,7,8,9,10,11,12,13,14,15},
	               {6,7,8,9,10,11,12,13,14,15,16},
		       {7,8,9,10,11,12,13,14,15,16,17},
	               {8,9,10,11,12,13,14,15,16,17,18},
	               {9,10,11,12,13,14,15,16,17,18,19},
	               {10,11,12,13,14,15,16,17,18,19,20}};
int main()
{
	int a, b;
	cin >> a >> b;
	cout << res[a][b] << endl;
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator