UVA10935

#include"iostream"
#include"algorithm"
#include"vector"
#include"map"
#include"string"
#include"deque"
#include"queue"
#include"stack"
#include"cstdio"
#include"cmath"
using namespace std;
int main()
{
	//freopen("a.txt","r",stdin);
	int n;
	while(cin>>n&&n)
	{
		cout<<"Discarded cards:";
		dequea;
		int i;
		for(i=1;i<=n;i++)
			a.push_back (i);		  //23456
		while(a.size()!=1)
		{
			int t=a.front();
			if(a.size()>2)
			    cout<<" "<

你可能感兴趣的:(UVA)