【2011 Greater New York Regional 】Problem B The Rascal Triangle
2013-10-01 16:24
295 查看
一个简单的规律题,每一列都是一个等差数列;
代码:
View Code
代码:
#include<cstdio> #define ll long long using namespace std; int main() { int p; int ca=1; scanf("%d",&p); while(p--) { int a,b; scanf("%d",&ca); scanf("%d%d",&a,&b); ll ans=(a-b)*b+1; printf("%d %lld\n",ca,ans); } return 0; }
View Code
相关文章推荐
- 【2011 Greater New York Regional 】Problem I :The Golden Ceiling
- 【2011 Greater New York Regional 】Problem H: Maximum in the Cycle of 1
- 【2011 Greater New York Regional 】Problem G: Rancher's Gift
- 【组队赛#6 Greater New York Regional 2009】解题总结
- Poj(2407),Greater New York Regional 2015 (D)
- Running Median 2009 Greater New York Regional
- Problem A - Sum Kind Of Problem 2015 ACM/ICPC Greater New York Region
- Problem D - Farey Sequence Length 2015 ACM/ICPC Greater New York Region
- Problem E - A Rational Sequence 2015 ACM/ICPC Greater New York Region
- Problem B - Run Step 2015 ACM/ICPC Greater New York Region
- 2010-2011 ACM-ICPC, NEERC, Southern Subregional Contest
- 【疑问】2011 Asia Fuzhou Regional A
- Editing 2011-2012 ACM-ICPC Northeastern European Regional Contest (NEERC 11)
- 2011 Asia Beijing Regional Online Contest-1005 hdu4044 GeoDefense
- Hadoop Summit 2011: HDFS Federation and Other New Features
- 2011 ACM/ICPC Chengdu Regional Preliminary 出题报告
- Hdu 4089 Activation (概率dp) - 2011 ACM-ICPC Beijing Regional Contest Problem I
- hdu chengdu 2011 regional D题
- New2011_抽象类,接口
- 2011 Asia Fuzhou Regional Contest