随笔分类 - STL-vector
摘要:题目大意:有n个人围坐在圆桌周围,每个人都有一个固定的编号。 从第s(<=n)个人开始报数(按照顺时针方向,从1开始),报到m的人出列,接着再从出列着的 下一个人开始报数(依然从1开始),报到m的人又出列······重复进行,直到所有人都出列。给定任意的n,s.m和刚开始n个人的编号,求他们出列的顺
阅读全文
摘要:首先讲一下vector,vector被称作向量容器,头文件要包括#include<vector> 可以考虑下面定义: vector<int> x; vector<char> y; x和y分别是整形向量,字符型向量,他们都是空向量 下面介绍如何使用vector: 1、vector的初始化: int n
阅读全文
摘要:题目链接:http://codeforces.com/problemset/problem/93/B B. End of Exams time limit per test 1 second time limit per test memory limit per test 256 megabyte
阅读全文
摘要:题目链接:http://codeforces.com/problemset/problem/589/A Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the ca
阅读全文
摘要:题目链接:https://vjudge.net/contest/241341#problem/C Tree Land Kingdom is a prosperous and lively kingdom. It has N cities which are connected to each oth
阅读全文
摘要:学习链接:http://www.runoob.com/cplusplus/cpp-stl-tutorial.html kandaima
阅读全文

浙公网安备 33010602011771号