格式:类型,数组名字[数组长度];
比如: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 |
30860 | dhxxgjj | Accepted | 1544 KB | 0 ms | C++ | 249 bytes | 2020-09-14 12:53:10 | |
30835 | dhxxgjj | H | Accepted | 1544 KB | 0 ms | C++ | 217 bytes | 2020-09-14 12:48:47 |
30816 | dhxxgjj | H | Wrong Answer | 1544 KB | 0 ms | C++ | 255 bytes | 2020-09-14 12:44:24 |
30788 | dhxxgjj | G | Accepted | 1544 KB | 0 ms | C++ | 267 bytes | 2020-09-14 12:36:12 |
30702 | dhxxgjj | Compile Error | 0 KB | 0 ms | C++ | 331 bytes | 2020-09-14 12:23:04 | |
30686 | dhxxgjj | Wrong Answer | 1544 KB | 0 ms | C++ | 264 bytes | 2020-09-14 12:19:51 | |
30676 | dhxxgjj | Wrong Answer | 1544 KB | 0 ms | C++ | 262 bytes | 2020-09-14 12:13:51 | |
14489 | dhxxgjj | Wrong Answer | 1544 KB | 0 ms | C++ | 257 bytes | 2019-12-18 13:47:51 | |
14487 | dhxxgjj | E | Accepted | 1544 KB | 0 ms | C++ | 310 bytes | 2019-12-18 13:43:33 |
14461 | dhxxgjj | E | Wrong Answer | 1544 KB | 0 ms | C++ | 266 bytes | 2019-12-17 12:38:26 |
14458 | dhxxgjj | E | Wrong Answer | 1544 KB | 0 ms | C++ | 279 bytes | 2019-12-17 12:36:24 |
14453 | dhxxgjj | D | Accepted | 1544 KB | 0 ms | C++ | 253 bytes | 2019-12-17 12:24:43 |
14442 | dhxxgjj | D | Wrong Answer | 1544 KB | 0 ms | C++ | 236 bytes | 2019-12-17 12:10:40 |
14441 | dhxxgjj | D | Wrong Answer | 1544 KB | 0 ms | C++ | 205 bytes | 2019-12-17 12:09:22 |
14440 | dhxxgjj | C | Accepted | 1544 KB | 0 ms | C++ | 300 bytes | 2019-12-17 12:06:10 |
14439 | dhxxgjj | C | Presentation Error | 1544 KB | 0 ms | C++ | 282 bytes | 2019-12-17 12:03:35 |
14419 | dhxxgjj | C | Presentation Error | 1544 KB | 0 ms | C++ | 282 bytes | 2019-12-16 12:39:43 |
14417 | dhxxgjj | C | Wrong Answer | 1544 KB | 0 ms | C++ | 209 bytes | 2019-12-16 12:37:23 |
14414 | dhxxgjj | B | Accepted | 1544 KB | 0 ms | C++ | 210 bytes | 2019-12-16 12:33:05 |
14403 | dhxxgjj | A | Accepted | 1544 KB | 0 ms | C++ | 181 bytes | 2019-12-16 12:25:49 |