CCF201412(1)门禁系统
来源:互联网 发布:统计局数据报送 编辑:程序博客网 时间:2024/04/30 08:38
下面代码不管怎么测试结果都是对的,可是系统评定依然0分。。。。。
#include<stdio.h>int main(){int n;int a[1001];int book[1001]={0};scanf("%d",&n);int i;for(i=1;i<=n;i++){scanf("%d",&a[i]);if(book[a[i]]==0){a[i]=1;book[a[i]]=1;}else{book[a[i]]++;a[i]=book[a[i]];}}for(i=1;i<=n;i++)printf("%d ",a[i]);printf("\n");return 0;}
今天做了一道题相邻数对问题,就想到了这道题换了一种方法AC,迷之测评系统啊
#include<stdio.h>int main(){int n;int a[1001];int book[1001]={0};scanf("%d",&n);int i;for(i=1;i<=n;i++)scanf("%d",&a[i]);for(i=1;i<=n;i++){book[a[i]]++;printf("%d ",book[a[i]]);}return 0;}
0 0
- CCF201412(1)门禁系统
- CCF201412-1-门禁系统
- CCF201412-1 门禁系统(100分)
- CCF201412-1 门禁系统 桶签到
- 门禁系统 (201412-1)
- 201412-1 门禁系统
- CCFCSP201412-1门禁系统
- 201412-1 门禁系统
- 201412-1门禁系统
- 201412-1 门禁系统
- ccf201412-1
- CCF201412-1
- CCF-门禁系统-201412-1
- CCF-201412-1 门禁系统
- CCF 201412-1 门禁系统
- CCF-201412-1-门禁系统
- CCF 201412-1 门禁系统
- ccf-201412-1 门禁系统
- iOS10适配
- request.getSession().getServletContext().getRealPath 为null
- Ignatius and the Princess IV
- 把之字形的字符横向输出
- 华为Oj----Sudoku(数独)
- CCF201412(1)门禁系统
- DSP调试通过,可以运行,观测变量数据为-1.#QNAN的原因
- python-数据清洗
- I
- hdu1181:变形课
- Python中的zip函数
- 忘记Windows服务器密码怎么办
- 并查集
- Android Studio找回签名和密码