gym-101343I-Husam and the Broken Present 1

 1 ///水题
 2 #include <bits/stdc++.h>
 3 using namespace std;
 4 int main()
 5 {
 6     int n;
 7     int m;
 8     int ans[110];
 9     scanf("%d",&n);
10     for(int i=0;i<n;i++)
11         for(int j=0;j<n;j++)
12     {
13         scanf("%d",&m);
14         if(i==j)
15         {
16             ans[i]=sqrt(m);
17         }
18     }
19     for(int i=0;i<n;i++)
20         printf("%d ",ans[i]);
21     printf("\n");
22 }
时间: 2024-10-13 03:33:12

gym-101343I-Husam and the Broken Present 1的相关文章

Codeforces Gym 100114 H. Milestones 离线树状数组

H. Milestones Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100114 Description The longest road of the Fairy Kingdom has n milestones. A long-established tradition defines a specific color for milestones in each region, with a

Uva11988 Broken Keyboard (a.k.a. Beiju Text)(就是先输出括号的字符)

Description Problem B Broken Keyboard (a.k.a. Beiju Text) You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the keyboard is that sometimes the "home" key or the "end" key gets automa

UVA11988 Broken Keyboard (a.k.a. Beiju Text)

看到大一练习题,睡前水一水~~~ Problem B Broken Keyboard (a.k.a. Beiju Text) You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the keyboard is that sometimes the "home" key or the "end" key gets a

Codeforces Gym 100500F Problem F. Door Lock 二分

Problem F. Door LockTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/attachments Description It was a beautiful night at Yekaterinburg, the sky was crystal clear with no clouds, and the view of the moon and the stars was

B - Broken Keyboard (a.k.a. Beiju Text)

Problem B Broken Keyboard (a.k.a. Beiju Text) You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the keyboard is that sometimes the "home" key or the "end" key gets automatically pres

CodeForces Gym 100935D Enormous Carpet 快速幂取模

Enormous Carpet Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Gym 100935D Description standard input/outputStatements Ameer is an upcoming and pretty talented problem solver who loves to solve problems using computers.

AIX 5.3 Install Oracle 10g RAC 错误集锦--9i RAC present

AIX 5.3 Install Oracle 10g RAC 错误集锦--9i RAC Present 系统环境: 操作系统: AIX 5300-08 集群软件: CRS 10.2.0.1 数据库:   Oracle 10.2.0.1                     系统架构图 故障现象: 解决方法: [[email protected] tmp]# cat /etc/oratab # This file is used by ORACLE utilities.  It is creat

ubnutu 安装sogoupinyin初学遇上 software database is broken 问题

ubuntu 16.04lts 安装的时候选择一路默认安装.也没有选择pinyin输入. 然后发现忘记安装输入法了. 于是下载了sogoupinyin linux  deb版本 双击安装.发现失败. 于是选择dpkg 方式安装.提示依赖包缺失问题.提示缺失 fcitx 等一堆包 然后 选择 apt-get 想下载这些包安装.但提示无法下载. 目测还是安装sogoupinyin缺失.于是陷入一个死循环.登录设置里面选择安装输入源.直接提示 software database is broken 看

B - Average Gym - 101161B 组合数学

http://codeforces.com/gym/101161/attachments 今天被卡常了,其实是自己对组合数技巧研究的不够. 如果是n, m <= 1e5的,然后取模是质数,那么可以用费马小定理. 如果n, m都比较小,那么其实是直接杨辉三角.不用逆元那些. 这题的思路是,枚举每一一个ave,然后总和就是n * ave 相当于方程  x1 + x2 + .... + xn = n * ave中,在0 <= x[i] <= full的情况下,不同解的个数中,使得x[i] ==