10895 - Matrix Transpose

All about problems in Volume 108. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

arash
New poster
Posts: 6
Joined: Wed Feb 19, 2014 10:19 am

Re: 10895 - Matrix Transpose

Post by arash » Wed Feb 25, 2015 5:51 pm

brianfry713 wrote:Change line 48 to:
for (int j=0; j < v.size() && v[j].first.first==i; j++) {

yesssssss :D
thank you sooooooo much :wink:

hquilo
New poster
Posts: 13
Joined: Fri May 02, 2014 9:45 pm

Re: 10895 - Matrix Transpose

Post by hquilo » Fri Mar 06, 2015 3:30 pm

Some sample test cases

Input

Code: Select all

4 2
1 1
1
1 1
2
1 1
3
1 1
4
4 4
1 1
1
1 2
2
1 3
3
1 4
4
1 1
1 1
8
1 2
2 1 2
1 -1
AC output:

Code: Select all

2 4
4 1 2 3 4
1 2 3 4
0

4 4
1 1
1
1 2
2
1 3
3
1 4
4
1 1
1 1
8
2 1
1 1
1
1 1
-1

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 10895 - Matrix Transpose

Post by uDebug » Thu Apr 16, 2015 1:03 pm

Added some input to help with testing / debugging here:

http://www.udebug.com/UVa/10895
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

Post Reply

Return to “Volume 108 (10800-10899)”