12. Permissions
Previous lecture chores:
What this code do?
TODO See LecturesCMC/LinuxSoftware2017/04_Permissions and Books/LinuxIntro/06ChapterPermissions in Russian
H/W
EJudge: NumCount 'Count numbers'
Input text stream containing integer numbers and count them. Integer is a sequence of one or more decimal digits, probably leading by «-». All integers are separated by other (neither digit, nor '-') characters. Output the number of integers.
1 -2 3@@@@100== __-567,678 7 800 90$ #-100 %%%%
10
EJudge: MatrixDisplay 'Display matrix'
Input a stream of integers (each from 0…999 range), that is elements of N×N matrix, ordered by rows. Detect this N and output the matrix (note "%3d" format is used). Also note the task can not be reasonably solved when input is manual. Assume input is always redirected from file like task < example_file.
260 301 565 56 895 361 993 627 180 423 198 117 370 810 390 885 314 708 632 678 97 273 811 976 44
260 301 565 56 895 361 993 627 180 423 198 117 370 810 390 885 314 708 632 678 97 273 811 976 44
EJudge: TransArray 'Transpose a rectangular area'
Input a rectangular matrix of M×N integers (0…999), line by line. Determine M and N, transpose matrix and output it line by line using «"%3d"» format.
918 707 260 475 180 691 78 96 744 955 192 703 619 848 745 920 505 474 254 179 418 335 842 312 150 122 577 574 85 966 852 40 500 123 200 690 328 542 277 583 352 412 22 541 940 60 125 452 132 592 315 309 420 888
918 78 619 254 150 852 328 22 132 707 96 848 179 122 40 542 541 592 260 744 745 418 577 500 277 940 315 475 955 920 335 574 123 583 60 309 180 192 505 842 85 200 352 125 420 691 703 474 312 966 690 412 452 888
EJudge: RotateFence 'Rotate a stack of arrays'
Input a number of various integer sequences (0…999) line by line. Rotate the whole structure clockwise and output it using «"%3d"» format. Trailing spaces are ignored (you may both leave or strip them).
173 864 629 283 277 563 969 907 785 415 100 944 972 784 722 925 784 446 494 65 572 120 150 153 511 204 743 199 963 334 955 663 128 946 642 5 758 310 363
128 511 572 446 415 283 173 946 204 120 494 100 277 864 642 743 150 65 944 563 629 5 199 153 972 969 758 963 784 907 310 334 722 785 363 955 925 663 784