格式:类型,数组名字[数组长度];
比如: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 |
71299 | loumingzhi | G | Accepted | 1548 KB | 0 ms | C++ | 254 bytes | 2021-12-04 11:27:36 |
71298 | loumingzhi | G | Wrong Answer | 1548 KB | 0 ms | C++ | 254 bytes | 2021-12-04 11:26:14 |
71297 | loumingzhi | H | Accepted | 1544 KB | 0 ms | C++ | 324 bytes | 2021-12-04 11:19:12 |
71296 | loumingzhi | H | Wrong Answer | 1544 KB | 0 ms | C++ | 327 bytes | 2021-12-04 11:17:02 |
71295 | loumingzhi | H | Wrong Answer | 1544 KB | 0 ms | C++ | 296 bytes | 2021-12-04 11:12:49 |
71136 | loumingzhi | Accepted | 1544 KB | 0 ms | C++ | 248 bytes | 2021-11-29 13:06:39 | |
71130 | loumingzhi | Accepted | 1544 KB | 0 ms | C++ | 273 bytes | 2021-11-29 13:00:08 | |
71128 | loumingzhi | Wrong Answer | 1584 KB | 0 ms | C++ | 268 bytes | 2021-11-29 12:55:52 | |
71127 | loumingzhi | Compile Error | 0 KB | 0 ms | C++ | 267 bytes | 2021-11-29 12:55:04 | |
70383 | loumingzhi | E | Accepted | 1548 KB | 0 ms | C++ | 346 bytes | 2021-11-24 12:23:40 |
70382 | loumingzhi | E | Wrong Answer | 1548 KB | 0 ms | C++ | 330 bytes | 2021-11-24 12:19:36 |
70381 | loumingzhi | E | Wrong Answer | 1548 KB | 0 ms | C++ | 328 bytes | 2021-11-24 12:19:02 |
70380 | loumingzhi | E | Compile Error | 0 KB | 0 ms | C | 328 bytes | 2021-11-24 12:18:36 |
70313 | loumingzhi | G | Wrong Answer | 1548 KB | 0 ms | C++ | 240 bytes | 2021-11-22 12:53:44 |
70312 | loumingzhi | G | Wrong Answer | 1548 KB | 0 ms | C++ | 241 bytes | 2021-11-22 12:51:28 |
70311 | loumingzhi | G | Wrong Answer | 1548 KB | 0 ms | C++ | 246 bytes | 2021-11-22 12:50:34 |
70305 | loumingzhi | D | Accepted | 1548 KB | 0 ms | C++ | 364 bytes | 2021-11-22 12:37:01 |
70303 | loumingzhi | D | Wrong Answer | 1548 KB | 0 ms | C++ | 324 bytes | 2021-11-22 12:28:55 |
70300 | loumingzhi | C | Accepted | 1548 KB | 0 ms | C++ | 322 bytes | 2021-11-22 12:23:21 |
70299 | loumingzhi | C | Presentation Error | 1548 KB | 0 ms | C++ | 322 bytes | 2021-11-22 12:17:09 |
69530 | loumingzhi | C | Presentation Error | 1548 KB | 0 ms | C++ | 322 bytes | 2021-11-18 13:11:24 |
69522 | loumingzhi | B | Accepted | 1548 KB | 0 ms | C++ | 252 bytes | 2021-11-18 12:40:12 |
69521 | loumingzhi | B | Accepted | 1548 KB | 0 ms | C++ | 252 bytes | 2021-11-18 12:39:58 |
69519 | loumingzhi | B | Runtime Error | 1548 KB | 0 ms | C++ | 251 bytes | 2021-11-18 12:38:17 |
69515 | loumingzhi | A | Accepted | 1580 KB | 0 ms | C++ | 221 bytes | 2021-11-18 12:32:32 |
69512 | loumingzhi | A | Compile Error | 0 KB | 0 ms | C | 221 bytes | 2021-11-18 12:31:15 |