Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

WA了,但不明白为什么,谁能给看一下吗?

Posted by Higen at 2014-11-01 16:05:30 on Problem 2894
#include <iostream>
#include <vector>

using namespace std;

int main()
{
	int t;
	cin>>t;
	for(int i=0;i<t;i++)
	{
		int n;
		cin>>n;
		char ch;
		int beg,end;
		vector<int> output(1000,0);
		while(n--)
		{
			cin>>ch>>beg>>end;
			for(int j=beg;j<end;j++)
				++output[j];
		}
		for(int k=0;k<end;k++)
			if(output[k]!=0)
				cout<<(char)(output[k]+64);
		cout<<endl;
	}
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator