Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这样不就ACle#include<iostream.h> int a[10][10]={1,1,1,1,1,1,1,1,1,1, 1,2,2,3,3,4,4,5,5,6, 1,2,3,4,5,7,8,10,12,14, 1,2,3,5,6,9,11,15,18,23, 1,2,3,5,7,10,13,18,23,30, 1,2,3,5,7,11,14,20,26,35, 1,2,3,5,7,11,15,21,28,38, 1,2,3,5,7,11,15,22,29,40, 1,2,3,5,7,11,15,22,30,41, 1,2,3,5,7,11,15,22,30,42}; int main() { int i,t,m,n; cin>>t; for(i=0;i<t;i++) { cin>>n>>m; cout<<a[m-1][n-1]<<endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator