自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

初涉_代码世界

记录一些自己做题时的思路,供自己以后回顾,也可供他人参考

  • 博客(8)
  • 问答 (1)
  • 收藏
  • 关注

原创 例题7.1.4,双基回文数

#include using namespace std; int p[100]; int main() { int n; cin>>n; while( 1 ) { n++; int m; int ok=0; for( int b=2 ; b<=10 ; ++b )

2013-07-22 14:33:50 368

原创 例题7.1.3,分数拆分

前端输出个数暂时没思路...先放后端... #include using namespace std; int main() { int k,count=0; cin>>k; for( int y=k+1 ; y<=2*k ;++y ) { int x; x=k*y; if( x%(y-k)==0 )

2013-07-18 17:01:12 405

原创 例题7.1.2,最大乘积

#include using namespace std; int s[20]; int main() { int n; cin>>n; for( int i=0 ; i<n ; ++i ) cin>>s[i]; long long max=s[0]; long long t; for( int i=0 ; i<n ; ++i

2013-07-18 16:31:40 326

原创 例题7.1.1,除法

有点长,不知道有没有更简洁的代码。 #include using namespace std; int s[10]={0}; bool cheak() { for( int i=0 ; i<10 ; ++i ) { if( s[i] > 1 )return 0; } return 1; } int main() { int

2013-07-18 16:16:42 465

原创 UVA:10300 - Ecological Premium

German farmers are given a premium depending on the conditions at their farmyard. Imagine the following simplified regulation: you know the size of each farmer's farmyard in square meters and the numb

2013-07-16 16:55:40 340

原创 UVA:10071 - Back to High School Physics

A particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?   Input The input will contain two integ

2013-07-16 16:14:40 354

原创 UVA:445 - Marvelous Mazes

Your mission, if you decide to accept it, is to create a maze drawing program. A maze will consist of the alphabetic characters A-Z, * (asterisk), and spaces. Input and Output Your program will ge

2013-07-13 20:14:38 505

原创 UVA:490 - Rotating Sentences

这题千万注意要初始化数组!!就因为忘记清零数组我折腾了一个下午 #include #include #include using namespace std; const int MAX=110; int main(int argc, char *argv[]) { //system("color 0a"); char input[MAX][MAX]; mem

2013-07-13 17:45:40 417

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除