格式:类型,数组名字[数组长度];
比如:int a[10]; 表示定义了一个长度为10的数组,数组名为a,其中数组下标从0开始,即a[0], a[1], a[2]...a[9];
输入这10个数,可以使用for循环实现
for(int i=0; i<10; i++) cin>>a[i];
也可以对其中的某个值赋值,比如a[0] = 1,a[5] = 3;
整个数组的输出,也可以for循环实现。
可以把一维数组理解成,一维的表格。
RunID | User | Problem ID | Result | Memory | Time | Language | Code Length | Submit Time |
12427 | wyx123 | G | Accepted | 1544 KB | 0 ms | C++ | 336 bytes | 2019-11-17 15:27:52 |
12424 | wyx123 | G | Presentation Error | 1544 KB | 0 ms | C++ | 357 bytes | 2019-11-17 15:25:52 |
11413 | wyx123 | Accepted | 1544 KB | 0 ms | C++ | 324 bytes | 2019-11-07 15:40:34 | |
11270 | wyx123 | H | Accepted | 1544 KB | 0 ms | C++ | 340 bytes | 2019-11-07 12:27:55 |
10947 | wyx123 | A | Accepted | 1548 KB | 0 ms | C++ | 220 bytes | 2019-11-05 12:39:52 |
10932 | wyx123 | Accepted | 1548 KB | 0 ms | C++ | 281 bytes | 2019-11-05 12:35:06 | |
10895 | wyx123 | Wrong Answer | 1548 KB | 0 ms | C++ | 300 bytes | 2019-11-05 12:19:28 | |
10888 | wyx123 | Wrong Answer | 1548 KB | 0 ms | C++ | 227 bytes | 2019-11-05 12:17:33 | |
10270 | wyx123 | E | Accepted | 1544 KB | 0 ms | C++ | 308 bytes | 2019-10-31 15:50:35 |
10262 | wyx123 | C | Accepted | 1584 KB | 0 ms | C++ | 338 bytes | 2019-10-31 15:27:38 |
10254 | wyx123 | C | Compile Error | 0 KB | 0 ms | C++ | 318 bytes | 2019-10-31 13:20:08 |
10253 | wyx123 | C | Compile Error | 0 KB | 0 ms | C++ | 317 bytes | 2019-10-31 13:19:56 |
10230 | wyx123 | D | Accepted | 1548 KB | 0 ms | C++ | 296 bytes | 2019-10-31 13:12:56 |
10202 | wyx123 | D | Presentation Error | 1548 KB | 0 ms | C++ | 294 bytes | 2019-10-31 13:07:20 |
10199 | wyx123 | D | Presentation Error | 1548 KB | 0 ms | C++ | 294 bytes | 2019-10-31 13:07:06 |
9889 | wyx123 | B | Accepted | 1548 KB | 0 ms | C++ | 263 bytes | 2019-10-30 12:46:09 |
9887 | wyx123 | B | Runtime Error | 1544 KB | 0 ms | C++ | 261 bytes | 2019-10-30 12:45:13 |
9884 | wyx123 | B | Runtime Error | 1544 KB | 0 ms | C++ | 266 bytes | 2019-10-30 12:43:11 |