ural 1149【模拟】
来源:互联网 发布:js parentnode 编辑:程序博客网 时间:2024/05/01 09:35
http://acm.timus.ru/problem.aspx?space=1&num=1149
模拟,不解释。
#include <vector>#include <list>#include <map>#include <set>#include <queue>#include <string.h>#include <deque>#include <stack>#include <bitset>#include <algorithm>#include <functional>#include <numeric>#include <utility>#include <sstream>#include <iostream>#include <iomanip>#include <cstdio>#include <cmath>#include <cstdlib>#include <limits.h>using namespace std;int lowbit(int t){return t&(-t);}int countbit(int t){return (t==0)?0:(1+countbit(t&(t-1)));}int gcd(int a,int b){return (b==0)?a:gcd(b,a%b);}int max(int a,int b){return a>b?a:b;}int min(int a,int b){return a>b?b:a;}#define LL long long#define PI acos(-1.0)#define N 1000000#define INF INT_MAX#define eps 1e-8#define FRE freopen("a.txt","r",stdin)void work(int n){ int i,j; for(i=1;i<=n;i++) { printf("sin"); printf("("); if(i==n) { printf("%d",i); break; }printf("%d",i); if(i&1)printf("-"); else printf("+"); } for(i=1;i<=n;i++) printf(")");}int main(){ int n; while(scanf("%d",&n)!=EOF) { int i,j; for(i=1;i<=n-1;i++) printf("("); j=0; for(i=n;i>=2;i--) { j++; work(j); printf("+"); printf("%d",i); printf(")"); } work(n); printf("+1\n"); } return 0;}
- ural 1149【模拟】
- URAL 1821 Biathlon(模拟)
- 模拟题 ural 1784. Rounders
- URAL 1386 Maze 简单模拟
- URAL 1319. Hotel (模拟)
- URAL 2073 Log Files (模拟)
- ural 2073 - Log Files 模拟
- ural 1048. Superlong Sums 模拟
- ural 1149
- Ural 1915 - Reconstruction of Bygones 模拟
- URAL 1037. Memory Management (模拟)
- URAL 1715 Another Ball Killer(大模拟)
- URAL 1881Long problem statement 模拟
- ural 1998 The old Padawan (模拟+二分)
- Ural 1520 Empire Strikes Back(模拟退火)
- URAL 1290. Sabotage(STL & 模拟啊)
- URAL 1889. Airport Announcements 模拟题
- URAL 1893. A380(模拟啊 )
- BP神经网络在肺癌分类中应用_附matlab代码
- svn p20
- 使用tomcat连接器对apache和tomcat进行负载平衡集群(1)
- Linux mongodb安装
- hibernate主键生成策略
- ural 1149【模拟】
- xen块设备体系结构(1)
- 【iOS-Cocos2d游戏开发之六】对触屏事件追加讲解,解决无法触发ccTouchMoved事件[重要!]
- 【晓峰】百度优化与google优化的重点与区别
- 使用注册表修改本地安全策略“帐户: 使用空密码的本地帐户只允许进行控制台登录”
- 线性时间选择
- Photoshop cs4 任何像素都不大于50%选择,选区将不可见的原因及解决方法
- chroot说明
- 晕,今天才知道,原来谷歌工具栏不支持Chrome