Problem F
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 84 Accepted Submission(s) : 25
。,以后从头開始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。
2
20
40
1 7 191 19 37#include<stdio.h>
int w,a;
int x[10000],s[10000]; int main()
{
int i,j,l,k,c,b,n,m;
scanf("%d",&n);
while(n--)
{
scanf("%d",&a);
for(i=1;i<=a;i++)
x[i]=i;
w=1;
while(a>3)
{
k=a;
if(w%2!=0)
{
j=1;//刚開始这个地方出错了错写成j=0;
for(i=1;i<=k;i++)
{
if(i%2!=0)
{
s[j]=x[i];
x[j]=s[j];
j++;
}
else a--; }
}
else{
j=1;//<span style="font-family: 'Courier New', Courier, monospace;">刚開始这个地方出错了错写成j=0;</span>
for(i=1;i<=k;i++)
{
if(i%3!=0)
{
x[j]=x[i];
j++;
}
else a--;
}
}
w++;
}
for(i=1;i<=a;i++)
printf("%d ",x[i]);
printf("\n");
}
return 0;
}
Problem F的更多相关文章
- 实验12:Problem F: 求平均年龄
Home Web Board ProblemSet Standing Status Statistics Problem F: 求平均年龄 Problem F: 求平均年龄 Time Limit: ...
- The Ninth Hunan Collegiate Programming Contest (2013) Problem F
Problem F Funny Car Racing There is a funny car racing in a city with n junctions and m directed roa ...
- Codeforces Gym 100500F Problem F. Door Lock 二分
Problem F. Door LockTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/at ...
- Codeforces Gym 100002 Problem F "Folding" 区间DP
Problem F "Folding" Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/ ...
- Codeforces Gym 100286F Problem F. Fibonacci System 数位DP
Problem F. Fibonacci SystemTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudg ...
- Problem F: Exponentiation
Problem F: ExponentiationTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 4 Solved: 2[Submit][Status][W ...
- Problem F: 合唱比赛开始了!
Problem F: 合唱比赛开始了! Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 440 Solved: 201[Submit][Status][ ...
- 几何入门合集 gym101968 problem F. Mirror + gym102082 Problem F Fair Chocolate-Cutting + gym101915 problem B. Ali and Wi-Fi
abstract: V const & a 加速 F. Mirror 题意 链接 问题: 有n个人在y=0的平面上(及xoz平面).z=0平面上有一面镜子(边平行于坐标轴).z=a平面上有q个 ...
- Problem F Plug It In!
题目链接:https://cn.vjudge.net/contest/245468#problem/F 大意:给你插座和电器的对应关系,有多个电器对应一个插座的情况,但是一个插座只能供一个电器使用,现 ...
- 2013-2014 ACM-ICPC, NEERC, Southern Subregional Contest Problem F. Judging Time Prediction 优先队列
Problem F. Judging Time Prediction 题目连接: http://www.codeforces.com/gym/100253 Description It is not ...
随机推荐
- cf 843 B Interactive LowerBound [随机化]
题面: 传送门 思路: 这是一道交互题 比赛的时候我看到了直接跳过了...... 后来后面的题目卡住了就回来看这道题,发现其实比较水 实际上,从整个序列里面随机选1000个数出来询问,然后从里面找出比 ...
- SGU 乱搞日志
SGU 100 A+B :太神不会 SGU 101 Domino: 题目大意:有N张骨牌,两张骨牌有两面有0到6的数字,能相连当且仅当前后数字相同,问能否有将N张骨牌连接的方案?思路:裸的欧拉回路,注 ...
- 物理课(physics)
物理课(physics) 题目描述 wzy正在上物理课!他发现了一个完全不会的题目:caoxia在一个奇妙的星球上(重力加速度为gg)踢了一只猫,猫飞起的路线与地面夹角为θθ (角度制),初速度为vv ...
- java根据开始时间结束时间计算中间间隔日期
public static void main(String[] args) throws Exception { String beginDate = "2016-07-16"; ...
- python数据结构之字典
1.python字典的定义 1.用大括号{},以逗号分隔每个键值对,键与值之间用冒号连接 2.键:需要不可变的数据结构,值可以是任意的数据对象 3.字典是无序的,键在字典中必须是唯一,在字典中取值的方 ...
- react 当中当组件抛出的dom元素最外层不止一个的时候的写法
在react16当中,对一个组件抛出多个dom进行了支持,写法 以数组形式抛出
- Docker(六):容器
一.启动容器 启动容器有两种方式,一种是基于镜像新建一个容器并启动,另一个是将一个在终止状态的容器重新启动,因为Docker的容器实在是太轻量了,很多用户都可以随时删除和新创建容器. 新建并启动 $s ...
- Eclipse中的android项目前面有叹号 (转)
问题描述:在Eclipse中导入一个项目,在项目名上有感叹号出现,基本上是由于build path的问题. 解决方法: 在项目上右击-->build path -> configure b ...
- 《Linux命令行与shell脚本编程大全 第3版》Linux命令行---53
以下为阅读<Linux命令行与shell脚本编程大全 第3版>的读书笔记,为了方便记录,特地与书的内容保持同步,特意做成一节一次随笔,特记录如下:
- 如何得知 GIC 的所有中斷
can get the supported GIC interrupts from the below adb command, adb root adb shell cat /proc/interr ...