Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <vector>
#include <stack>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
using std::stack;
#include <iostream>
#include <vector>
#include <cstring>
int main()
{
using namespace std;
while (true) {
int n, m;
#include <iostream>
#include <vector>
int main()
{
using namespace std;
while (true) {
int n, m;
cin >> n >> m;
#include <iostream>
#include <vector>
#include <memory>
int main()
{
using namespace std;
while (true) {
int n, m;
#ifndef __VECTOR_H__
#define __VECTOR_H__
#include <iostream>
#include "Trace.h"
using std::cout;
using std::endl;
template<class T>
@s25g5d4
s25g5d4 / 11340.c
Last active August 29, 2015 14:21
uva-11340
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t;
scanf("%d%*c", &t);
while (t--) {
#include <iostream>
#include <algorithm>
#include <vector>
#include <array>
struct Ant
{
int pos;
int order;
char direction;
#include <iostream>
#include <algorithm>
#include <vector>
#include <array>
struct Ant
{
int pos;
int order;
char direction;
/* correct */
for (int i = 1; i < n; ++i) {
if (ants[i].pos == ants[i - 1].pos) {
ants[i].direction = 'T';
ants[i - 1].direction = 'T';
}
}
/* wrong */
for (auto it = ants.begin() + 1; it != ants.begin() + n; ++it) {