Page 1 of 1
12667 - Last Blood
Posted: Sat Jan 25, 2014 7:59 pm
by uDebug
Here's some input / output that I found useful during testing / debugging.
Please note that there are 2 separate input / output test cases.
Input 1:
Code: Select all
5 10 18
0 2 B No
11 2 B Yes
20 3 D Yes
35 8 E No
40 8 E No
45 7 E No
50 10 D Yes
100 4 D No
120 6 B Yes
160 2 E Yes
180 2 D Yes
210 3 B Yes
240 10 G Yes
250 10 G Yes
270 2 B Yes
295 8 E Yes
296 7 L Yes
299 10 D Yes
AC Output 1:
Code: Select all
A - -
B 210 3
C - -
D 180 2
E 295 8
Input 2:
[Removed because it didn't follow the input specifications.]
Re: 12667 - Last Blood
Posted: Sun Jan 26, 2014 7:36 pm
by fazel
thanks friend for your contributions to community, it was really useful for me( for (12662 Good teacher))
can any one help me with this i have no idea were is the problem .
Code: Select all
//io
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <iomanip>
//useful C
#include <cctype>
#include <ctime>
#include <math.h>
//string
#include <sstream>
#include <string>
#include <string.h>
//container
#include <set>
#include <map>
#include <list>
#include <vector>
#include <queue>
#include <stack>
#include <bitset>
//algorithm STL
#include <functional>
#include <numeric>
#include <algorithm>
using namespace std;
//int mov[4][2]= {{-1,0},{1,0},{0, -1} , {0, 1}};
//int mov[8][2]= { {-1,0},{1,0},{0, -1} , {0, 1} , {-1,-1} , {-1, 1} , {1 ,-1} , {1, 1}};
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ul;
typedef vector<int> vi;
#define SETALL(a , val) memset( a , val , sizeof a)
#define INF 1000000000
//Data Structures!!
typedef pair<int ,int > pi;
int main()
{
//freopen("in.txt" , "r" , stdin);
//freopen("out.txt" , "w" , stdout);
bool first[13][110];
pi stat[13];
int n , t ,m ;
memset( first , true , sizeof first);
memset( stat , -1 , sizeof stat);
cin>>n>>t>>m;
for(int i = 0 ; i < m ; i++)
{
int ti , tt;
string ver;
char pp;
cin>>ti >>tt>>pp>>ver;
if(ver == "Yes")
if(first[pp - 'A'][tt])
{
first[pp - 'A'][tt] = false;
stat[pp - 'A'] = make_pair(ti , tt);
}
}
for(int i = 0 ; i < n ;i++)
if( stat[i].first >=0 )
cout<<char('A'+i)<<' '<<stat[i].first<<' '<<stat[i].second<<endl;
else
cout<<char('A' + i)<<' ' <<'-'<<' '<<'-' <<endl;
}
Re: 12667 - Last Blood
Posted: Mon Jan 27, 2014 5:21 am
by brianfry713
That is AC code.