Skip to content

UVa 10895

WinDaLex edited this page Sep 15, 2013 · 1 revision

Tree Reconstruction

from Chapter 3. Data Structures :: Fundamental Data Structures :: Exercises: Beginner

Problem

转置一个稀疏矩阵,矩阵大小不超过10000 * 10000,非零元素不超过1000个。

Solution

把输入的矩阵,行列调换存储即可。原本稀疏矩阵应该用链表来表示,但是这题用STL的vector也能过。

Clone this wiki locally