7.13——cf 304A
来源:互联网 发布:淘宝网店页头图片 编辑:程序博客网 时间:2024/05/20 18:45
结果正确但超时代吗:
#include<iostream>using namespace std;int main(){ int n; cin >> n; int ans = 0; for(int i = 1; i <= n; i++) { for(int j = 1; j <= n; j++) { for(int k = 1; k <= n; k++) { int t; int a = i, b = j, c = k; if(a > b){t = a; a = b; b = t;} if(a > c){t = a; a = c; c = t;} if(b > c){t = b; b = c; c = t;} if(a + b > c && c - b < a && c - a < b) { if(a * a + b * b == c * c) {ans++;} } } } } cout << ans / 6 << endl; return 0;}
0 0
- 7.13——cf 304A
- cf——#30A
- CF——#109div1 A
- CF——#104div1 A
- cf——A. Unusual Product
- cf——A. The Great Game
- cf——A. Mashmokh and Lights
- cf——A. Down the Hatch!
- CF 7A——比赛A Kalevitch and Chess
- cf——236——A. Nuts
- CF—98A—Help Victoria the Wise
- CF 6A——比赛 I - Triangle
- CF——A. Ksenia and Pan Scales
- CF初体验——Round #348, A
- cf 304A Pythagorean Theorem II
- CF——Trace
- CF——Taxi
- CF—Hot Bath
- Ice手册,第39章IceGrid 第5节使用部署
- ICE笔记(08):C++线程与并发
- php+jquery+ajax实现用户名验证
- 最大子矩阵和
- nova与cinder服务交互
- 7.13——cf 304A
- 服务器后台程序的内存使用问题
- 暑期大作战 第二天
- (Struts2学习篇) Struts2 拦截器
- C++课程设计-成绩管理系统
- atitit.提升开发效率---mda 软件开发方式的革命--(2)
- yarn 日志聚集配置
- Servlet3.0新特性&动态代理
- 更改扫描APP时会闪一下之前的代码