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 }
gym-101343I-Husam and the Broken Present 1
相關推薦
gym-101343I-Husam and the Broken Present 1
cnblogs bit using space namespace for bsp pri () 1 ///水題 2 #include <bits/stdc++.h> 3 using namespace std; 4 int main() 5 {
<gym101343J. Husam and the Broken Present 2> (狀壓DP)
一起 names 都是 預處理 ret %d 註意 一個 size 題意:給定n個串 每個串長度不超過100 找到一個新串 使得這n個串都是它的字串 輸出這個新串的最小長度 題解:n是15 n的階乘的復雜度肯定不行 就想到了2的15次方的復雜度 想到了狀壓
Margarite and the best present
put script lines turned orm %d perf recent black Little girl Margarita is a big fan of competitive programming. She especially loves prob
Codeforces Round #524 (Div. 2) B. Margarite and the best present 規律題
B. Margarite and the best present time limit per test 1 second memory limit per test 256 megabytes input standard input output stand
(規律)cf#524-B.Margarite and the best present
https://codeforces.com/contest/1080/problem/B 規律->奇數開始每兩個數和為-1,偶數開始每兩個數和為1,處理總個數的最後一個數即可 #include<bits/stdc++.h> using namespa
Codeforces Round #524 (Div. 2) Margarite and the best present CodeForces - 1080B
找一下規律即可。。 #include<stdio.h> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<strin
CF1080B Margarite and the best present
題目:Margarite and the best present 思路: 其實我們可以先列個表看看的—— a_i -1 2 -3 4 -5 6 -7 8 -9 10 sum_i -1 1 -2 2 -3 3 -4 4 -5 5
【規律 / 等差數列求和】Margarite and the best present
題目連結 題意: 給你 [ L,R ] 一個區間,區間內的元素,奇數為負,偶數為正,求出區間內的總和。 題解: 提供兩種想法,第一種就是我自己做的,中規中矩。找出兩個最前和最後的奇數和偶數,利用等差求和求得。 #include<bits/stdc++.h> using
c#系列----1 特性介紹 C# and the CLR
encapsulation : 封裝 inheritance: 繼承 polymorphism: 多型性 unified type system : type: an encapsulated unit of data and functions(類似於c++的類
數論題集1-7 (唯一分解定理+約數個數求和+素篩)Aladdin and the Flying Carpet
It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned
PyTorch 1.0 preview now available in Amazon SageMaker and the AWS Deep Learning AMIs
Amazon SageMaker and the AWS Deep Learning AMIs (DLAMI) now provide an easy way to evaluate the PyTorch 1.0 preview release. PyTorch 1.0 adds seam
Learning and Leading in the Era of Artificial Intelligence and Machine Learning, Part 1
Learning and Leading in the Era of Artificial Intelligence and Machine Learning, Part 1Wikimedia CommonsWith this 2-part blog series, I’ll explore the evol
The past, present and future of humankind
Life: a concoction of dual realities, myths and storiesCredit: TEDFor starters, Yuval Noah Harari is one of the skeptical thinkers who claims that humans k
42 Cutting Edge Facts About the Past, Present and Future of Artificial Intelligence
People have been dreaming about Artificial Intelligence for hundreds, if not thousands of years. Well, it's starting to feel like the future is actually he
Create a personal video watch list in the cloud with PHP and the Movie Database API Part 1
Up until a few years ago, I’d turn on the TV and find myself humming Springsteen’s “57 Channels and Nothin’ On” as I flipped through
Increasing the Adoption of UX and the Products You Design (Part 1)
Increasing the Adoption of UX and the Products You Design (Part 1)Applying Diffusion of Innovations TheoryJust because it is great, doesn’t mean it will be
How we screwed things up on Product Hunt and the #1 rule you need to follow to avoid it
How we screwed things up on Product Hunt and the #1 rule you need to follow to avoid itBeing on Product Hunt front page is a huge deal for startups, especi
Technology’s Broken Promises: Startups, Capitalism, and the Destructive Force of …
My Own Youthful NaivetyIt’s June 2013, and I’m cruising from SFO to The South of Market neighborhood (the pinnacle of startup driven gentrification in San
1-Computer Networks and the Internet
Each protocol belongs to one of the layers. A layer offers service to the layer above by (1) performing certain actions within that layer and by (2) using
The Past, Present, and Future of Speech Recognition Technology
The earliest advances in speech recognition focused mainly on the creation of vowel sounds, as the basis of a system that might also learn to interpret pho