uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ca5959e0-92ba-4d95-9c24-913e1349fffd
fatmagamalgalal/Problem_Solving
Codeforces/Div2-A/483A/483A.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { long long l,r; cin >> l >> r; if(r-l <2){ cout << -1; return 0; } for(long long i=l+2 ; i<=r ; i++){ if(__gcd(i-2,i-1) == 1 && __gcd(i-1 , i) == 1 && __gcd(i-2,i)!=1){ cout << i-2 << " " << i-1 << " " << i; return 0; } ...
ALGO
0.999973
3.585423
2a7f04ff-78ee-436b-8b79-d671e1216e1e
TheCrazyCoder28/HacktoberFest-Starter
c/gcd.cpp
#include <stdio.h> int gcd(int, int); int main() { int a, b, result; printf("Enter the two numbers to find their GCD: "); scanf("%d%d", &a, &b); result = gcd(a, b); printf("The GCD of %d and %d is %d.\n", a, b, result); } int gcd(int a, int b) { while (a != b) { if (a > b) ...
ALGO
0.998882
5.080973
f9f0f8eb-3fb4-4731-9d44-237386cda3de
anupART/HSMAccomodation
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
e9863670-8254-41b9-a0db-2f3a59151016
youssefelmougy/jaccard-selector
Selector/hclib/test/performance-regression/full-apps/qmcpack/src/QMCDrivers/Experimental/DMCPbyP.cpp
namespace qmcplusplus { /// Constructor. DMCPbyP::DMCPbyP(MCWalkerConfiguration& w, TrialWaveFunction& psi, QMCHamiltonian& h): QMCDriver(w,psi,h), KillNodeCrossing(0), BranchInterval(-1), NonLocalMoveIndex(-1), BranchInfo("default"), KillWalker("no"), Reconfiguration("no"), NonLocalMove("no"), Mover(0) { ...
ALGO
0.956002
5.674139
57e5c7c5-07da-4187-8df8-867562d708cd
sauravpastor/cpp-code
q3power.cpp
//q3 #include<iostream> using namespace std; int main(){ int n,sum=0; cout<<"enter no"; cin>>n; for(int i=1;i<=n;i++){ if(i==n) cout<<"("<<i<<"^"<<2<<")"<<"="; else cout<<"("<<i<<"^"<<2<<")"<<"+"; sum=sum+(i*i); } cout<<sum; }
ALGO
0.999129
3.592598
60f6df73-caea-4525-a107-c450e9b7df24
rnrgll/codetree-TILs
241005/합을 옆으로 밀어 출력/push-the-sum-sideways-to-output.cpp
#include <iostream> #include <string> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n, input; int sum = 0; cin >> n; for(int i=0; i<n; i++) { cin >> input; sum += input; } string s = to_string(sum); s = s.substr(1) + s[0]; cout << s; return 0; }
ALGO
0.999812
5.763473
fc5dd2d1-9c45-4858-883f-36f1489c8052
swkajnBruceee/LeetCode
1000-1999/T_1706_球会落何处.cpp
#include<iostream> #include<vector> using namespace std; // 顢ģ class Solution { public: int find(vector<vector<int>>& grid, int j, int m, int n) { for(int i = 0; i < m; i++) { // ͬߣס if((j+1) < n && grid[i][j] == 1 && grid[i][j+1] ==...
ALGO
0.999977
5.249503
8911cb76-60ec-48ef-9ff3-b2ee290c196c
TheUCoin/theucoin
src/core_read.cpp
#include "core_io.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #include "serialize.h" #include "streams.h" #include <univalue.h> #include "util.h" #include "utilstrencodings.h" #include "version.h" #include <boost/algorithm/string/classification.hpp> #include <boost/...
TOOL
0.864092
7.158648
eb0262d7-f2f7-41ca-ad50-edef68feba15
samoutlier/my-codes-cpp
07_Recusrion/10_Reverse_String.cpp
#include <iostream> #include <vector> using namespace std; void ReverseString(string &str, int start, int end) { if (start < end) { swap(str[start], str[end]); start++; end--; ReverseString(str, start, end); } } int main() { string str; cout << "Enter The String : "...
ALGO
0.999235
5.012582
737d798e-fae7-425c-8d26-73bd3c4fbfbc
arthurvtrr/AA-Problems-Solved
To Define/vasyaandpetyasgame.cpp
#include <stdio.h> #include <vector> using namespace std; vector < int > sol; bool prime[1100]; void sieve(int n) { for (int i = 0; i < 1100; i++) prime[i] = true; prime[0] = false; prime[1] = false; for (int i = 2; i < n+1; i++) { if (prime[i]) { sol.push_back(i); for...
ALGO
0.999851
4.614435
3da3fe55-63e4-4279-8de4-847f746946a4
YURSHAT/stk_2005
xr_3da/xrGame/stalker_property_evaluators.cpp
//////////////////////////////////////////////////////////////////////////// // Module : stalker_property_evaluators.cpp // Created : 25.03.2004 // Modified : 26.03.2004 // Author : Dmitriy Iassenev // Description : Stalker property evaluators classes //////////////////////////////////////////////////////////////...
ALGO
0.856453
6.122604
9ced1a8e-6313-4203-ad8a-d31cc7083c71
ishandutta2007/codeforces
noimi/normal/1268/C.cpp
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <deque> #include <set> #include <stdlib.h> ...
ALGO
0.999937
3.386627
1230ad97-8d53-4dcf-a7f7-5d378f0d027c
BahaaEldeenOsama/Competitive-Programming
FCAI-CU Contests/2020 - 2021/E. Body Mass Index.cpp
#pragma GCC optimize ("O3") #include<iostream> #include<algorithm> #include<vector> #include <iomanip> using namespace std; /// Info. ///****************************************************************************************************************************************/// /// author : BAHAA El_DEEN ...
ALGO
0.999276
4.154491
02396276-498e-48c5-b1f8-3962f3a914d5
Vinit-28/POTD-Leetcode
Year=2024/Month=11/Date=07/Solution.cpp
// Problem Link : https://leetcode.com/problems/largest-combination-with-bitwise-and-greater-than-zero/description/ // Solution // class Solution { public: int largestCombination(vector<int>& candidates) { int maxGroupSize = 0; for(int bitIdx=0; bitIdx<31; bitIdx++){ int setBits = 0; ...
ALGO
0.999943
6.179833
7a3e1ff4-1d4f-49f2-9b58-249b7a237bb2
ishandutta2007/codeforces
bleddest/normal/776/E.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second long long phi (long long n) { long long result = n; for (long long i=2; i*i<=n; ++i) if (n % i == 0) { while (n % i == 0) n /= i; result -= result / i; } if (n > 1) result -= result / n; return result; } int main() { ...
ALGO
0.999961
4.315591
0251ef16-9141-4f2b-856b-1f09930fcfba
raincross7/code-similarity
codes/train_code/problem158/problem158_325.cpp
// include // ------------------------------------------------ #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <math.h> using namespace std; // func // ------------------------------------------------ int CalcSumOfDigit(int n); // 各桁の和を計算する。 string upper(string str); // 英字を大文字に変換する...
ALGO
0.999764
4.684079
9729a468-f18d-415e-ad52-69621d973872
wisdompeak/LeetCode
String/1698.Number-of-Distinct-Substrings-in-a-String/1698.Number-of-Distinct-Substrings-in-a-String_v2.cpp
typedef uint64_t ULL; class Solution { public: int countDistinct(string s) { int n = s.size(); ULL base = 26; int count = 0; for (int len = 1; len <=n; len++) { ULL power = 1; for (int i=0; i<len-1; i++) power ...
ALGO
0.999992
5.512536
68101c46-cd3d-418c-8722-161e247ca2e6
chestNutLsj/acwing-code
basic-class/5-dynamic-programming/02-knapsack/5.cpp
// 二进制优化版 多重背包 #include <iostream> #include <vector> using namespace std; const int N = 20010; // 根据问题规模调整N的大小 int f[N]; struct Good { int v, w; }; int main() { int num, vol; cin >> num >> vol; vector<Good> goods; for (int i = 1; i <= num; i++) { int v, w, s; cin >> v >> w >...
ALGO
0.99978
4.47738
90ee00a2-0844-4f58-a772-7abcebb156dd
Dhara3078/DSA_notes_and_resources
DSA Sheet by Arsh (Solved que by me)/Array/Container With Most Water.cpp
//Link for the question: //https://leetcode.com/problems/container-with-most-water/submissions/ //Idea is to use two pointer approach //Step 1: make two pointer: left and right // left points to first element of height array and right points to last element of array //Step 2: run while loop till le...
ALGO
0.99999
6.689612
dee139e9-5fa0-416c-a6f3-8f67a305e0c1
Spamster1306/Lexical_Analyzer_CD_Project
main.cpp
#include <iostream> using namespace std; int main() { int a = 5, b = 10, temp; cout << "Before swapping." << endl; cout << "a = " << a << ", b = " << b << endl; temp = a; a = b; b = temp; cout << "\nAfter swapping." << endl; cout << "a = " << a << ", b = " << b << endl; return 0...
ALGO
0.99593
3.954783
5c6c7baa-2d9c-4333-800e-20bc8ade2a20
104478896/leetcode
39. 组合总和.cpp
/*给你一个 无重复元素 的整数数组 candidates 和一个目标整数 target ,找出 candidates 中可以使数字和为目标数 target 的 所有 不同组合 ,并以列表形式返回。你可以按 任意顺序 返回这些组合。 candidates 中的 同一个 数字可以 无限制重复被选取 。如果至少一个数字的被选数量不同,则两种组合是不同的。 对于给定的输入,保证和为 target 的不同组合数少于 150 个。 */ class Solution { public: void dfs(vector<int>&candidates,int index,int target,vector<vector<in...
ALGO
0.99987
6.297256
d9fecee9-d41f-43ad-8d34-92827674239f
Vikram8084/Data-structures-Algo
week 3/02_array level 1/05_array.cpp
#include<iostream> using namespace std; int main(){ int arr[5]; int n=5; for(int i=0;i<n;i++){ cout<<"Enter the value for index "<<i<<": "; cin>>arr[i]; cout<<endl; } cout<<"Printing the array "<<endl; for(int i=0;i<n;i++){ cout<<arr[i]<<" "; } return 0; ...
ALGO
0.948211
3.055871
c2bf3a44-6fef-4c5b-9964-978284dbeb79
ashipan/library
math/extgcd.cpp
//EXTGCD a*x + b*y = extGCD ll extGCD(ll a, ll b, ll &x, ll &y){ if(b == 0) { x = 1; y = 0; return a;} ll d = extGCD(b, a%b, y, x); y -= a/b*x; return d; }
ALGO
0.998292
3.61195
1515bc45-2e7d-4bdc-982b-42f62f90206c
squey/squey
src/libpvkernel/src/core/serialize_numbers.cpp
#include <pvkernel/core/serialize_numbers.h> #include <stdint.h> #include <numeric> #include <algorithm> #include <cctype> #include <stdexcept> size_t PVCore::get_count_from_ranges(const std::vector<std::pair<size_t, size_t>>& ranges) { size_t count = 0; for (auto [begin, end] : ranges) { count += end - begin + 1...
TOOL
0.891342
6.889675
e97a056f-6487-4242-863c-daa5371fd758
Pratik772846/leetcode
0445-add-two-numbers-ii/0445-add-two-numbers-ii.cpp
class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { stack<int> s1, s2; while (l1 != nullptr) { s1.push(l1->val); l1 = l1->next; } while (l2 != nullptr) { s2.push(l2->val); l2 = l2->next; } i...
ALGO
0.999932
6.701134
ee7b72ce-e0e1-4ba4-820d-330d3b32f316
LU-C-AS/bustub
src/optimizer/nlj_as_hash_join.cpp
#include <algorithm> #include <memory> #include "catalog/column.h" #include "catalog/schema.h" #include "common/exception.h" #include "common/macros.h" #include "execution/expressions/column_value_expression.h" #include "execution/expressions/comparison_expression.h" #include "execution/expressions/constant_value_expre...
ALGO
0.997042
5.820539
b45ff193-adf5-4799-bd86-9daa98b87b75
bcm314/OpenTal
sources/src/book_internal.cpp
#include "rodent.h" #include <cstdio> #include <cstdlib> #include <cstring> void sInternalBook::Init() { #include "book_internal.h" n_of_records = 0; // clear any preexisting internal book for (int i = 0; wbook[i]; ++i) { if (LineToInternal(wbook[i], BC)) { printf("White book error: %s\n", wbook...
ALGO
0.996862
5.070576
35afe90b-89d3-4be9-9479-1c63f2156268
shadowstacker21/C-Algorithm
C_Replacement.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<int>v(n); for(int i=0;i<n;i++) { cin>>v[i]; } for(auto s:v) { if(s>0) { s=1; } else if(s<0) { s=2; } else s=0; c...
ALGO
0.999866
3.76767
10cbf980-e749-4c14-a433-dce55d00594f
SonuRajput1010/DSA_GFG
Easy/Detect Loop in linked list/detect-loop-in-linked-list.cpp
//{ Driver Code Starts //Initial template code for C++ #include <bits/stdc++.h> using namespace std; struct Node { int data; Node* next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node* head, Node* tail, int position) { if(position==0) return; No...
ALGO
0.999714
4.505662
8ba623f0-385f-42d2-9db7-c0c0cb861442
coder-devansh/DSA
2915-count-of-interesting-subarrays/count-of-interesting-subarrays.cpp
class Solution { public: long long countInterestingSubarrays(vector<int>& nums, int modulo, int k) { vector<int>count(nums.size()+1,0); count[0]=0; for(int i=1;i<=nums.size();i++){ count[i]=count[i-1]+(nums[i-1]%modulo==k?1:0); } map<int,int>mp; long long ...
ALGO
0.999918
5.598821
e946facb-8d46-4e27-a7ff-1cbdaea4a911
Rudy451/cpp_primer
ex16.2.cpp
#include <iostream> using namespace std; template<typename T> bool compare(const T &one, const T &two){ return (two < one) ? 1 : (one < two) ? 0 : -1; } int main(){ cout << compare(1, 0) << endl; }
ALGO
0.999813
3.642993
7049b3b3-1c79-4490-bc26-f3cb2397c334
kapil2570/leetcode-problems
2195-time-needed-to-buy-tickets/time-needed-to-buy-tickets.cpp
class Solution { public: int timeRequiredToBuy(vector<int>& tickets, int k) { queue<pair<int,int>>q; int ans = 0; int n = tickets.size(); for(int i=0 ; i<n ; i++) { q.push({i,tickets[i]}); } while(!q.empty()) { pair<int,int>pr = q.front(); ...
ALGO
0.999972
5.919805
4b5ea603-cbc5-450b-ba3b-261b25ed6ca3
bulldog3000/quick_sort
quick_sort.cpp
#include <iostream> void quickSort(int arr[], int left, int right) { int i = left, j = right; int pivot = arr[(left + right) / 2]; while (i <= j) { while (arr[i] < pivot) { i++; } while (arr[j] > pivot) { j--; } if (i <= j) { std:...
ALGO
0.999974
5.721726
86b484bf-fe10-452c-9f22-2c1d28ab251b
beardbytes/30-day-leet-code-challenge
Week-2/Backspace_string_compare.cpp
/* Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character. Note that after backspacing an empty text, the text will continue empty. Input: S = "ab#c", T = "ad#c" Output: true Explanation: Both S and T become "ac". */ class Solution { public: ...
ALGO
0.997458
6.286994
f409f73e-5854-47e0-9c34-c9da00501058
AdityaHegde02/Leetcode-Solved
1980-find-unique-binary-string/1980-find-unique-binary-string.cpp
class Solution { public: void generate(string &temp,int i,int n,vector<string> &allStrings){ if(i >= n){ allStrings.push_back(temp); return; } temp += '0'; generate(temp,i + 1,n,allStrings); temp.pop_back(); temp += '1'; genera...
ALGO
0.999915
6.118962
88d9103f-2b28-4878-bb01-76970c28a0ca
daishironishida/AtCoder-submissions
abc/abc283/f.cpp
#include <iostream> #include <cmath> #include <limits> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> p(N); for (int i = 0; i < N; i++) { cin >> p.at(i); } vector<int> result(N); for (int i = 0; i < N; i++) { int diff = 1; int min...
ALGO
0.999994
3.821922
8d3aa0d6-24de-486c-9610-b3213bf99e92
Seyamalam/DMOJ
Fibonacci2.cpp
// Ivan Carvalho // Solution to https://dmoj.ca/problem/fibonacci2 #include <bits/stdc++.h> #define REP(A, B) for (int(A) = 0; (A) < (B); (A)++) using namespace std; typedef long long ll; const int N = 2; const ll MOD = ll(1e9 + 7); const ll PISANO = 2000000016LL; struct matrix { ll mat[N][N]; }; matrix multiplicat...
ALGO
0.999988
4.54193
75fbb3d4-c269-48b2-88b7-99012cc27781
sohamghs02/DSA_Series-Till-Queue-
primesieveoferastosthenes.cpp
#include<iostream> #include<vector> using namespace std; //using Sieve void sieve(bool prime[]){ //setting TRUE for every number for(int i=2;i<=1000000;i++){ prime[i]=1; } for(int i = 2; i<=1000000; i++){ if(prime[i]){ //iske saare multiple mark krde - non prime ...
ALGO
0.99988
4.443125
9a1057e6-0c81-4a4e-9e4e-6ad88db42650
apurvjain9999/Computer-Graphics-Lab
lab1/apj_nqueen.cpp
//n-queen problem //Apurv Jain //2017KUCP1016 #include<iostream> using namespace std; void display(int **chess, int n) { cout<<"Solution for the Chessboard of size "<<n<<"x"<<n<<" is: "<<endl; for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { cout<<chess[i][j]<<"\t"; ...
ALGO
0.998605
4.801959
1a3cf455-8a45-494d-a4f0-ec2e0c1994bc
williamrshen/dmoj-solutions
submissions/5346911.cpp
#include <iostream> using namespace std; #define ok "\n" const int MN = 1005; int n, q, g[MN][MN], r[MN], c[MN], d = 0; int32_t main() { cin.tie(0); cin.sync_with_stdio(0); cin >> n >> q; for (int i = 1; i <= n; i++) { r[i] = i; c[i] = i; for (int j = 1; j <= n; j++) { cin >> g[i][j]; } } for (int i...
ALGO
0.999973
4.275568
bd3cb045-8a48-4fe3-83b3-1ec3c18c2398
jzm1926817/NKUyoy_Lite
(补发)第一次:基于命令行的部分功能实现/ArmyMove.cpp
//Verified #include<bits/stdc++.h> using namespace std; //移动特判: //1.越界2.有人镇守3.升级4.连通5.截断 const int n=5,m=5; int ma[20][20],r[20][20],q[7][400],totalcount[400],f[7]; int cash[10][400]; int army[20][20],nearlykill[20][20]; //q=t*k,t=1~6,国家;k每个国家的第k块地的格子个数,如果为0代表被其他连通块合并 //r:每块地是哪个国家的第几块地 //f:每个国家有几块领地 //cash:每个连通块的金币 //t...
ALGO
0.999283
3.947229
31d3342e-cf60-4b27-9ec0-c184a6f8ccce
Ivan-71-ua/Competitive-Programming
LeetCode/386_3.cpp
#include <bits/stdc++.h> class Solution { std::vector<int> res; public: std::vector<int> lexicalOrder(int n) { int cur = 1; while(res.size() < n) { res.push_back(cur); if(cur * 10 <= n) { cur *= 10; } else { while(cur == n || cur % 10 == 9) { cur /= 10; } cur++; } } return re...
ALGO
0.999384
6.628314
038a1ec0-f5a5-4901-a66a-3ac3aad9a472
kkarimi62/myLammps
tools/pymol_asphere/src/miscm.cpp
#include "miscm.h" double am::square(double num) { return num*num; } // Rounds a number double am::round(double n) { double r=ceil(n); if (r-n>0.5) return floor(n); return r; } // Return the -1 for negative, 0 for zero, and 1 for positive int am::sign(double v) { if (v<0) return -1; if (v>0) return...
TOOL
0.936077
5.613039
2f96d446-8f60-45ee-a428-3d1f7f277fac
longwatermelon/usaco
silver/20open3.cpp
#include <bits/stdc++.h> using namespace std; using ll=long long; #define sig(x) (x<0?-1:1) #define sz(x) ((int)size(x)) #define all(x) begin(x),end(x) #define all1(x) begin(x)+1,end(x) template <typename T> using vec=vector<T>; const int N=1e5; int n; struct pt_t {int x,y;} pt[N+1]; vec<int> adj[N+1]; bool vis[N+1];...
ALGO
0.999668
4.717305
33b27dff-f0a0-454e-b5dd-0efaf7f7807c
jokercold/gluttony
块状树/bzoj3720Gty的妹子树.cpp
#include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int maxb=251; const int maxn=100000+10; struct Blocks{ int a[maxb],size; void ins(int x){ ++size; int pos=size; for (int i=size;i>1&&a[i-1]>x;i--) a[i]=a[i-1],pos=i-1; a[p...
ALGO
0.999986
4.029699
bcd49532-f160-47f2-85e7-5091a90c2867
KryptoCrash/cf
scoring.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pi = pair<ll, ll>; using vi = vector<ll>; using vpi = vector<pi>; using vb = vector<bool>; void solve() { ll n; cin >> n; ll s, h; cin >> s >> h; vector<double> a(n); for(int i = 0; i < n; i++) { cin >> a[i]; ...
ALGO
0.999366
3.597061
b74cbb6c-134b-4235-9e9f-c9c7e3afea6f
tarungautam137/-6Companies30days
Google/Design_Add_And_Search_Word_Data_Structure.cpp
# include<bits/stdc++.h> using namespace std; class WordDictionary { public: unordered_map<string, int> mp; WordDictionary() {} void addWord(string word) { mp[word]++; } bool search(string word) { int n = word.size(); vector<int> v; for (int i = 0; i < n; i++) { ...
ALGO
0.999601
5.352526
33689d7c-9c21-49a6-b9a2-3c632904ebe6
Ashrafmuhmed/Data_Structures
Queue/CircularQueue.cpp
#include<bits/stdc++.h> using namespace std ; // --> Creating template to make the stack generic "WORK WITH DIFFERENT DATA TYPES"... template <class var> class CircularQueue{ //declaring the data members private : int count , front , rear , maxSize ; var *queue ; public : // The constr...
ALGO
0.99905
4.166987
27ce9841-fae5-404e-a900-c55885b3426e
jmvalois/Sherlock_Compilation
SRC_old/system_of_eqn/eigenSOE/SymBandEigenSOE.cpp
// $Revision: 1.4 $ // $Date: 2009-05-20 17:31:36 $ // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/eigenSOE/SymBandEigenSOE.cpp,v $ // Written: MHS // Created: Oct 2001 // // Description: This file contains the class definition for // SymBandEigenSOE, which stores a symmetric banded matrix, A, for // standard e...
TOOL
0.971366
5.599691
0ef4c44f-c73f-44ab-81ad-726d8a94210a
MObinXIV/a-Repo-to-get-back-My-level-of-the-devil
Algorithms/Graph/Algorithms/articulationPoint.cpp
// Find the articulation point in the graph #include<bits/stdc++.h> using namespace std; int timer = 0; void dfs(int node, int parent, vector<int>& vis, vector<int> adj[], int tin[], int low[], vector<int>& isArticulation) { vis[node] = 1; tin[node] = low[node] = timer++; int children = 0; for (auto& ...
ALGO
0.999948
5.770894
1005b302-cebc-41f9-9f8a-9e5203899eea
suxutao/LeetcodeList
cn/1012-numbers-with-repeated-digits .cpp
#include "../../../stdc.h" using namespace std; //leetcode submit region begin(Prohibit modification and deletion) class Solution { public: int numDupDigitsAtMostN(int n) { string s=to_string(n); int m=s.size(); vector<vector<int>>dp(m,vector<int>(4100,-1)); auto dfs=[&](auto&&dfs,i...
ALGO
0.999888
6.48761
d74845e5-b2ab-42a1-9f42-2a9c30e7a572
muskan300600/DSA
Array/58.smallest_freq_k.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int arr[] = {3, 3, 2, 2, 4, 4, 9}; int N = sizeof(arr) / sizeof(arr[0]); int K; cin >> K; int count = 0; int j = 0; vector<int> v; while (j != N) { for (int i = 0; i < N; i++) ...
ALGO
0.999935
4.174595
eae54ca8-980a-43c0-a6bd-89297b136cff
tony9402/algorithm-solutions
solutions/baekjoon/11279/main.cpp
// Authored by : tony9402 // Co-authored by : - // Link : http://boj.kr/53d07a6885b1412d93b53a1fe211e153 #include<bits/stdc++.h> using namespace std; priority_queue<int> pq; int main(){ ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; pq.push(0); for(int i=0;i<N;i++){ int x;cin ...
ALGO
0.999978
4.360403
4f044047-ef0c-4ae2-b9b8-1be35516cc34
tarekziade/onnx-native
main.cpp
#include <iostream> #include <vector> #include <string> #include <numeric> // for std::accumulate #include <chrono> // for timing #include <dlfcn.h> #include <algorithm> #include "onnxruntime_c_api.h" #include <iostream> #include <fstream> #include "onnx.pb.h" #include <google/protobuf/io/zero_copy_stream_impl_li...
TOOL
0.936387
7.200294
a9af45af-31fe-472f-a10b-bbbdb0d942b3
lihazinoob/LeetCode_Problem_Solve
58.Length_of_the_last_word.cpp
// Problem Link: https://leetcode.com/problems/length-of-last-word/ #include<bits/stdc++.h> using namespace std; class Solution { public: int lengthOfLastWord(string s) { // return s.size(); int last = s.size() -1; while(s[last] == ' ') { last--; } // retu...
ALGO
0.998564
5.073998
864e0447-862c-4723-87fd-0c9c41020bcf
secondo-database/secondo
Algebras/Rose/RoseJava/twodsack/util/meshgenerator/NetGen/libsrc/geom2d/geom2dmesh.cpp
#include <mystdlib.h> #include <csg.hpp> #include <geometry2d.hpp> #include <meshing.hpp> namespace netgen { Refinement2d :: Refinement2d (const SplineGeometry2d & ageometry) : Refinement(), geometry(ageometry) { ; } Refinement2d :: ~Refinement2d () { ; } void Refinement2d :: PointBetw...
ALGO
0.95706
5.341874
49aa8481-b70d-4920-ad9c-42d705d43dbe
p-alone/openCV
modules/aruco/samples/detect_diamonds.cpp
#include <opencv2/highgui.hpp> #include <opencv2/aruco/charuco.hpp> #include <vector> #include <iostream> using namespace std; using namespace cv; namespace { const char* about = "Detect ChArUco markers"; const char* keys = "{sl | | Square side lenght (in pixels) }" "{ml | | M...
TOOL
0.977559
6.76735
3837cfae-6d03-4611-b337-8420106be129
Muliphein/InfoNorm
third_party/raytracing/eigen-3.4.0/unsupported/doc/examples/FFT.cpp
// To use the simple FFT implementation // g++ -o demofft -I.. -Wall -O3 FFT.cpp // To use the FFTW implementation // g++ -o demofft -I.. -DUSE_FFTW -Wall -O3 FFT.cpp -lfftw3 -lfftw3f -lfftw3l #ifdef USE_FFTW #include <fftw3.h> #endif #include <vector> #include <complex> #include <algorithm> #include <iterator>...
ALGO
0.984823
6.129515
c0311be1-e2b9-4424-ab4a-895b6bd71754
ishandutta2007/codeforces
antoine/normal/1093/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; struct Point { int c[5]; Point() {} Point(const int k) { memset(c, 0, sizeof c); for (int i = 0; i < k; ++i) cin >> c[i]; } }; struct V { Point pts[1 << 5]; V() {} V(const Point p) { for (Point &x : pts) x = p; } V(const V &v1,...
ALGO
0.999645
4.693399
49c3e771-9a0c-4d58-8b61-5c4cd25c8f62
renhaofan/Source-Archive
OpenCV/opencv_contrib-3.4.5/modules/xphoto/src/grayworld_white_balance.cpp
#include "opencv2/core.hpp" #include "opencv2/core/hal/intrin.hpp" #include "opencv2/xphoto.hpp" namespace cv { namespace xphoto { void calculateChannelSums(uint &sumB, uint &sumG, uint &sumR, uchar *src_data, int src_len, float thresh); void calculateChannelSums(uint64 &sumB, uint64 &sumG, uint64 &sumR, ushort *src_...
ALGO
0.991364
5.559457
b8a52099-4b51-4541-b2c7-6c02fe5def92
agr78/mSMV
code/dependencies/MEDI_functions/bet2/newmat6.cpp
//$$ newmat6.cpp Operators, element access, submatrices #include "include.h" #include "newmat.h" #include "newmatrc.h" #ifdef use_namespace namespace NEWMAT { #endif #ifdef DO_REPORT #define REPORT { static ExeCounter ExeCount(__LINE__,6); ++ExeCount; } #else #define REPORT {} #endif /******************...
TOOL
0.912202
6.271705
82067b78-3771-4b5f-9da3-bb23011a37fc
AKALemon/Template
03_DataStructrue/00_线段树/SegmentTree.cpp
struct Info { }; struct Tag { }; Info operator+(const Info &a, const Info &b){ Info f; return f; } void apply(Info &x, Tag &a, Tag f){ } template<class Info, class Tag> struct LazySegmentTree{ int n; vector<Info> info; vector<Tag> tag; LazySegmentTree() {} LazySegmen...
ALGO
0.999518
4.196479
d91e0060-360b-4053-8c24-965ad2ee7c74
mybittask/BITtask-master
bittask-source/src/checkpoints.cpp
#include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/foreach.hpp> #include "checkpoints.h" #include "txdb.h" #include "main.h" #include "uint256.h" static const int nCheckpointSpan = 10; namespace Checkpoints { typedef std::map<int, uint256> MapCheckpoints; // // What makes a good...
TOOL
0.905249
7.36436
b10adb4d-dcd5-4509-bf82-b91172879629
rnrgll/codetree-TILs
240811/소수 판별기/prime-number-discriminator.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n; bool isPrime = true; cin >> n; for(int i=2;i<n;i++){ if(n%i==0){ isPrime = false; break; } } cout << (isPrime?'P':'C'); return 0; }
ALGO
0.999975
4.284664
95a6129e-5410-40ad-81a0-3326d95820fc
zengmmm00/DSAA
week12/C_Valentine'sDay/main.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; struct node{ int key; vector<node*>vec; int depth; int color;//yellow = 1; red = -1; node(){depth=0;color=0;key=0;} }; node* queue[500010]; int front=0,rear=0; void enQueue(node* u){ queue[rear] = u; rear++; } void ...
ALGO
0.999949
4.280886
6678537f-a6cd-4dc2-8886-f3a1da171628
dj1vs/solutions
Sololearn/Community problems/C++/Gapful_Numbers.cpp
#include <iostream> using namespace std; int main() { int n; cin>>n; int c = n; while(c > 9) c/=10; if (n % (c*10 + n%10) == 0) cout << "This number is gapful."; else cout << "This number is not gapful."; return 0; }
ALGO
0.996449
4.130144
2ad01da2-b060-4a25-aa7a-3c6837ee417e
Ankur8789/Cp-Solution
vsc++/Insert_Digit.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; tree<int, null_type, less<...
ALGO
0.999909
5.569327
9e84f4c8-c6ad-4ce5-857b-48cc17f48bd5
healerXvivek/DSA
HASHING/first_non_repeating_element.cpp
class Solution{ public: int firstNonRepeating(int arr[], int n) { unordered_map<int,int> mp; for(int i=0;i<n;i++) mp[arr[i]]++; for(int i=0;i<n;i++){ if(mp[arr[i]]==1) return arr[i]; } return 0; } };
ALGO
0.999966
5.172033
179aec25-0b2d-41df-a59e-7a54d9f338db
chrystian9/algorithm_introduction_activities
12 Alocação Dinâmica e Ponteiros/questao8.cpp
#include <iostream> using namespace std; struct medalhas{ int ouro; int prata; int bronze; }; int main(){ medalhas *valor = new medalhas; cin >> valor->ouro >> valor->prata >> valor->bronze; medalhas *quant = new medalhas; cin >> (*quant).ouro >> (*quant).prata >> (*quant).bronze; int resultado; r...
ALGO
0.997475
3.929574
e77d65ac-080f-492f-81da-cd8adc228785
MateuszKubuszok/GameTheoryTools
src/gt/routines/bimatrix_mixed_equilibrium_routine.cpp
/** * @file gt/routines/bimatrix_mixed_equilibrium_routine.cpp * @brief Defines GT::Routines::BimatrixMixedEquilibriumRoutine methods. * @copyright (C) 2013-2014 * @author Mateusz Kubuszok * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero * ...
ALGO
0.999598
5.940127
903a5d66-0485-4aa1-85e3-20792f3956a6
namansinghal200/leetcode-simplified
Trees/diameter_of_a_tree.cpp
#include <bits/stdc++.h> using namespace std; // maximum of the sum of heights of left and right children across all nodes. struct Node { int data; Node *left; Node *right; Node(int x) { data = x; left = NULL; right = NULL; } }; class Solution { public: int height(N...
ALGO
0.999906
5.837526
f23753b0-426b-432c-bdf3-c9b533e83de1
arthur535/spec_ops
day4/day4_task7.cpp
#include <iostream> int last_word_length(std:: string str) { int count = 0; bool boolean = false; for (int i = str.length() - 1; i >= 0; i--) { if ((str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z')) { boolean = true; count++; } else { ...
ALGO
0.976965
4.80987
e59da54a-cf9b-4ea9-b467-80c94648a229
damariion/win-mdk
src/hash/xor.cpp
#include "../../include/hash/xor.h" using namespace mdk::hash; xor_::xor_(): xor_::xor_(NULL) {}; xor_::xor_(INT64 key) { this->key = key; if (!key) this->key = this->keygen(); } INT64 xor_::keygen() { srand(time(0)); int min = 1.0e8; INT64 max = INT16_MAX; return rand() % (max - min + 1) + min; } VOID x...
ALGO
0.891513
4.377398
79643169-66c4-40ff-ba44-498f6a27b338
rnpgp/rnp
src/lib/key.cpp
#include "key.hpp" #include "utils.h" #include <librekey/key_store_g10.h> #include "crypto/s2k.h" #include "crypto/mem.h" #include "crypto/signatures.h" #include "keygen.hpp" #include <librepgp/stream-packet.h> #include <librepgp/stream-key.h> #include <librepgp/stream-sig.h> #include <librepgp/stream-armor.h> #inclu...
TOOL
0.958299
7.778614
0815b5c4-fbbe-48a9-9b9a-85a6acd05e8e
sogno-platform/dpsim
dpsim/examples/cxx/CIM/EMT_WSCC-9bus_VBR.cpp
#include <iostream> #include <list> #include <DPsim.h> using namespace DPsim; using namespace CPS::EMT; int main(int argc, char *argv[]) { // Simulation parameters String simName = "EMT_WSCC-9bus_VBR"; Real timeStep; Real finalTime; DirectLinearSolverImpl implementation = DirectLinearSolverImpl::KLU; /...
ALGO
0.993964
4.719353
3b65e414-1112-41a0-a4d8-9691ed5f65da
thedyingkai/ACM-Repository
C++_Practices/LuoGu/luogu_104/P1308.cpp
// // Created by ASUS on 2025/2/4. // #include <iostream> #include <string> using namespace std; string inputs(){ string str; getline(cin,str); int len=str.size(); for(int i=0;i<len;i++) str[i]=(str[i]>=65&&str[i]<=90)?str[i]+32:str[i]; return ' '+str+' '; } int main(){ string a,x; int i=0,c...
ALGO
0.999985
4.242689
39316279-76d9-4cb4-95e5-53a0e5bd0816
neverac/codes
19s_10/C/20584238_YidaWang_C.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <map> #include <vector> #include <set> #include <queue> #include <cstdlib> using namespace std; #define LL long long #define INF 0x7fffffff #define P 998244353 LL read(){ LL x=0,f=1; char ch=getchar(); whi...
ALGO
0.99997
4.20742
3c9f9218-bc39-4ee3-9f1d-cacb44a46fbd
safakkayikci/Chess-Playing-Robot---Colak
stockfish-10-win/src/uci.cpp
#include <cassert> #include <iostream> #include <sstream> #include <string> #include "evaluate.h" #include "movegen.h" #include "position.h" #include "search.h" #include "thread.h" #include "timeman.h" #include "tt.h" #include "uci.h" #include "syzygy/tbprobe.h" using namespace std; extern vector<string> setup_bench...
ALGO
0.978942
7.512626
bc758e0a-252f-4700-a483-e9c22c5b4aff
ishandutta2007/codeforces
abdude824/normal/1255/B.cpp
// // // // // // // // // // // // // (`v) // `..Coding /* ********* * * * * * * * * ***************** * * * * * * * * ********* */ #include<bits/stdc++.h> using namespace std; #define int long long int #define ll long long int ...
ALGO
0.999658
3.492879
2b3f2baa-f0ba-46a8-bf5a-5eaa4162fe55
LittleYang0531/CQ-NOIP-2021
CQ-0212/number/number.cpp
#include<bits/stdc++.h> using namespace std; int t; int x[2000005]; bool st[10000005]; int last,primes[10000005],cnt; int ans[10000005]; bool getnum(int x) { while(x) { if(x%10==7) return 0; x/=10; } return 1; } int maxn; void init() { for(int i=1;i<=maxn;++i) { st[i]=1; } for(int i=1;i<=maxn;++i) { ...
ALGO
0.999881
4.096188
6c477256-699a-4e6d-b2d9-51139859b087
syryuauros/programming
cpp/projects/test/Fsum.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> long double Fsum(long double num1, long double num2) { long double result = 0; for (long double i = num1; i <= num2; i++) { //long double j = i/10000000000; result += i; } return result; } int main(int argc, char* argv[]) { long double in...
ALGO
0.992472
4.34736
f51c558c-4213-4e09-9bb7-29c768897650
AniKouDev/CodeChef
0-1000 Beginner Level/Bob_at_the_Bank.cpp
#include <iostream> using namespace std; #define breakline cout<<endl int main(){ int t; cin >> t; while(t--){ int w, x, y, z; cin >> w >> x >> y >> z; cout << w + (x-y)*z; breakline; } }
ALGO
0.995798
3.906077
093b87f2-0158-4f1b-baa4-ebe7b8e28cd5
ItachiUchiha619/Advanced-Game-Technologies-Master
Common/Matrix4.cpp
/* Part of Newcastle University's Game Engineering source code. Use as you see fit! Comments and queries to: richard-gordon.davison AT ncl.ac.uk https://research.ncl.ac.uk/game/ */ #include "Matrix4.h" #include "Matrix3.h" #include "Maths.h" #include "Vector3.h" #include "Vector4.h" #include "Quaternion.h" using nam...
TOOL
0.950291
6.574073
0eb54f0b-04aa-40ff-ad60-57778169b070
pth68/OpenTwinThirdParty
vtk/ThirdParty/verdict/vtkverdict/V_EdgeMetric.cpp
/* * * V_EdgeMetric.cpp contains quality calcultions for edges * * This file is part of VERDICT * */ #include "verdict.h" #include <math.h> /*!\brief Length of and edge. * Length is calculated by taking the distance between the end nodes. */ C_FUNC_DEF double v_edge_length( int /*num_nodes*/, double coordinat...
TOOL
0.967201
6.146296
7358bb0b-ace5-407c-90cf-ad41ff44bedc
Yeasiin/XPSC
Week-03/Day-3/D_X_Sum.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int n, m; int sum = 0; vector<pair<int, int>> d = { {-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; bool isValid(int ci, int cj) { return ci >= 0 && cj >= 0 && ci < n && cj < m; } int main() { int t; cin >> t; while (t--) ...
ALGO
0.999828
5.419448
e92eb186-5838-4a64-aaab-32f09729658c
Dasti-dev/LeetCode
485. Max Consecutive Ones.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { int maxi = 0; int size = 0; for(int i = 0 ; i < nums.size() ; i++) { if(nums[i] == 1) { size++; maxi = max(maxi,size); } else ...
ALGO
0.99989
6.032395
48c083a9-867a-46de-86df-14c649abf308
alefemoreira/ordenacao
src/hashtable.cpp
#include "../includes/hashtable.hpp" #include <algorithm> bool Hash::insert(int value) { int i = f(value); int count = 0; while (!(v[i] == 0 || v[i] == value)) { if (count > size / 2) return false; i = f1(value); count++; } v[i] = value; return true; } int Hash::find(int value) { int i = f...
ALGO
0.993551
5.360198
e8244da1-1914-40a8-b146-c3925f092acd
Debiprasadbarik/cpp-programs
c eg-1.6.cpp
#include <stdio.h> #define PERIOD 10 #define PRINCIPAL 5500 int main() { int year; float amount,value,inrate; amount=PRINCIPAL; inrate=0.11; year=1; while(year<=PERIOD) { printf("%2d %8.2f\n",year,amount); value=amount+inrate*amount; year=year+1; amount =value; } return 0; }
ALGO
0.99937
3.244406
b52d2ff1-b7f0-495f-8f78-622c54f5a79c
wwqqqqq/LeetCode-Solution
Reverse Linked List.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* reverseList(ListNode* head) { ListNode* last = NULL; ListNode* p = head; while(p != NULL) { ...
ALGO
0.999895
5.558578
fa3b0a68-5b8d-405f-9bd5-5a9acd06a23d
Lessica/HikariSummer
libc/src/math/copysignf.cpp
#include "src/math/copysignf.h" #include "src/__support/common.h" #include "utils/FPUtil/ManipulationFunctions.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(float, copysignf, (float x, float y)) { return fputil::copysign(x, y); } } // namespace __llvm_libc
ALGO
0.992903
5.679771
ce1046d4-4a30-4abd-9a83-5cf97b0d9d79
raincross7/code-similarity
codes/train_code/problem483/problem483_261.cpp
#include <cstdio> #include <iostream> #include <cstdlib> using namespace std; int func(int y, int m, int d); int main() { int n, m, p; while(1){ cin >> n >> m >> p; if(n == 0 && m == 0 && p == 0) break; int a[100], sum = 0; for(int i = 0; i < n; i++){ cin >> a[i]; sum += a[i]; } int b, c; b = s...
ALGO
0.999775
3.471281
bab35fd6-38ec-42e9-92ff-f67c08d74294
kagrawal6/repo759
HW03/task2.cpp
// task2.cpp #include <iostream> #include <vector> #include <random> #include <cmath> #include <cstdlib> #include <omp.h> #include "convolution.h" int main(int argc, char* argv[]) { // if (argc < 3) { // std::cerr << "Usage: " << argv[0] << " n m\n"; // return 1; // } std::size_t n = std::...
ALGO
0.998345
5.852843
3839fb6c-b0dc-4bd9-b549-f60d6fa3e14d
Rishabh-1936/CodeSpace
Concepts/Graph/13.1. Shortest path in weighted DAG cpp.cpp
#include <bits/stdc++.h> #define INF INT_MAX using namespace std; // DFS implementation of the topological sort void findTopoSort(int node, vector<int> &vis, stack<int> &st, vector<pair<int,int>> adj[]) { vis[node] = 1; for(auto it : adj[node]) { if(!vis[it.first]) { findTopo...
ALGO
0.999991
4.483645
05779922-d7c3-415c-9083-b67dd978cd1a
Hijiongfeng/Likou
daily/944.cpp
#include<bits/stdc++.h> using namespace std; /* 给你由 n 个小写字母字符串组成的数组 strs,其中每个字符串长度相等。 这些字符串可以每个一行,排成一个网格。例如,strs = ["abc", "bce", "cae"] 可以排列为: abc bce cae 你需要找出并删除 不是按字典序升序排列的 列。 在上面的例子(下标从 0 开始)中,列 0('a', 'b', 'c')和列 2('c', 'e', 'e')都是按升序排列的, 而列 1('b', 'c', 'a')不是,所以要删除列 1 。 返回你需要删除的列数。 */ class Solution { pub...
ALGO
0.999817
4.606102
9b07ed51-3442-4ec5-8050-d8a9936e2b19
Megha-Singh-10/SdeSheetChallenge
Graphs/DetectCycleDirectedBFS.cpp
/* Time Complexity: O(N+M) Space Complexity: O(N) Where N is the number of nodes and M is the number of edges in the given graph. */ #include <list> class Graph { int noOfNodes; // Pointer to an array containing adjacency lists. list < int > * adj; // Helper function for checkCyclic...
ALGO
0.999986
6.155725
b0617b32-ec61-4c0d-ae7e-1a7770056598
HeloisaJ/Competitive_Programming_Questions_Solved
UVa/686.cpp
#include<bits/stdc++.h> using namespace std; bool prime; void isPrime(int num){ int m = 2; while(m <= sqrt(num)){ if(num % m == 0){ prime = false; break; } m++; } } int main(){ // Goldbach’s Conjecture (II) int n; while(cin >> n && n != 0){ int p1 = 2, p2 = n - 2, cont = 0; while(p1 <= n/2){ ...
ALGO
0.999371
4.239089
b2e1f4c8-d8a3-4721-a0e0-3f3f77516ada
pollabd/leetcode
dominoPiling.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int a, b; cin >> a >> b; cout << floor((a * b) / 2) << endl; return 0; }
ALGO
0.995635
3.405582
7b2680c4-60f7-4c51-838e-0b409263ee77
linhenry2004/CP_Solutions
CSES Solutions/Graph Algorithms/Hamiltonian_Flights.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxn = 20; const int mod = 1e9 + 7; int n, m; ll dp[1<<maxn][maxn]; ll adj[maxn][maxn]; int main () { cin >> n >> m; for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; a--; b--; adj[a][b]++...
ALGO
0.999984
4.540003
529b7d49-21e1-4ecc-8ecd-23e19f530035
raptoravis/forwardplusrendering
thirdparty/boost_1_70_0/libs/graph/example/grid_graph_example.cpp
#include <iostream> #include <boost/array.hpp> #include <boost/graph/grid_graph.hpp> #define DIMENSIONS 3 using namespace boost; typedef grid_graph<DIMENSIONS> Graph; typedef graph_traits<Graph> Traits; // Define a simple function to print vertices void print_vertex(Traits::vertex_descriptor vertex_to_print) { std...
ALGO
0.964409
6.852503
89368ae6-c08c-409c-882f-86d9bf56658d
1804054Miraz/Uva-solutions
11172 - Relational Operator.cpp
#include<iostream> #include<cstdio> using namespace std; int main() { int testC,i; scanf("%d",&testC); for(i=0;i<testC;i++) { long long int a,b; cin>>a>>b; if(a==b) printf("=\n"); else if(a>b) printf(">\n"); else printf("<\n"); } return 0; }
ALGO
0.999878
3.613194