Codeforces 659A Round House (模拟)
来源:互联网 发布:js购物车结算 编辑:程序博客网 时间:2024/06/07 17:17
题目:http://codeforces.com/contest/659/problem/A
自己打的时候完全不对,各种细节。找的样例一个一个过,妈的。
哎,智商-100,。
代码:
#include<stdio.h>#include<string.h>using namespace std;int main(){ int n,a,b; scanf("%d%d%d",&n,&a,&b); if(b<0) { int i; for(i=a-1;b++;i--) { //printf("%d\n",i); if(i==0) i=n; //printf("%d\n",i); } printf("%d\n",++i); } else { int i; for(i=a;b--;i++) { if(i==n) i=0; } printf("%d\n",i>n?n:i); }}
0 0
- Codeforces 659A Round House (模拟)
- Codeforces 659A:Round House(模拟,转化)
- 【CodeForces】[659A]Round House
- 【Codeforces】659A - Round House
- CodeForces-659A-Round House
- CodeForces 659A Round House
- CodeForces 659A Round House
- codeforces 659A Round House
- Codeforces Round #346 (Div. 2) -A. Round House(模拟)
- A. Round House 模拟
- Codeforces 659A Round House【水题,细节】
- Codeforces 659A Round House 【小数学】
- CodeForces 659A Round House(水题)
- CodeForces 659A Round House(技巧)
- Codeforces Round #408 A. Buying A House
- CodeForces - 659A Round House (形成环)水
- CodeForces 659 A. Round House(简单数学推理)
- Codeforces Round #408 (Div. 2) A.Buying A House【模拟】水题~
- 使用ListView实现上拉加载更多数据
- Java第一阶段总结
- JQUERY实现局部刷新
- 数据结构之队列
- java Io 缓冲流 BufferedReader BufferedWriter 笔记
- Codeforces 659A Round House (模拟)
- android CoordinatorLayout与滚动的处理
- 全面解析Linux 内核 3.10.x - initramfs 启动流程
- 笔记 - 10.1、HTML - CSS概念笔记
- 面试智力题
- android 根据生日生成星座
- js实现跨域的几种方法的原理详解
- Android--BroadcastReceiver应用详解
- 关于Qt中QWidget的setParent的使用方法