uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
8fce9950-5209-4d4b-a71e-c3e1794d2300
nocotan/algorithms
atcoder/Cpp/ABC/075/D.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, k; cin >> n >> k; vector<int> x(n); vector<int> y(n); vector<int> xary, yary; for(int i=0; i<n; ++i) { cin >> x[i] >> y[i]; xary.push_back(x[i]); yary.push_back(y[i]); } ...
ALGO
0.999926
4.190931
3b54e661-8999-419d-843b-1bd963744b92
khuonggminhhoang/DSA-PTIT
sap-xep-chen.cpp
#include<iostream> using namespace std; void print(int a[], int pos){ for(int i=0; i<= pos; ++i) cout<<a[i]<<" "; cout<<endl; } void Insertion_Sort(int a[], int n){ int pos, x; for(int i=0; i<n; ++i){ x=a[i]; pos=i-1; int positions=pos; while( pos>=0 && a[pos] > x ){ a[pos+1] = a[pos]; --pos; ...
ALGO
0.999892
4.290827
32a124aa-aa26-43cd-a220-2d2e73653e59
amadou38/PowerIt_Deflation_MPI
eigen/doc/examples/nullary_indexing.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [functor] template<class ArgType, class RowIndexType, class ColIndexType> class indexing_functor { const ArgType &m_arg; const RowIndexType &m_rowIndices; const ColIndexType &m_colIndices; public: typedef Matrix<typename ArgType::Scalar, ...
ALGO
0.985361
7.050192
4196c10b-35ab-4e10-9488-957060030a39
kmjp/procon
codeforce/edu/021-040/025/g.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.99984
3.714686
770a0ba9-145e-45f8-a051-eebf4afdb7d7
chibd2000/hyscan
hyscan/crypto_Sha1.cpp
// 100% Public Domain. // // Original C Code // -- Steve Reid <<EMAIL>> // Small changes to fit into bglibs // -- Bruce Guenter <<EMAIL>> // Translation to simpler C++ Code // -- Volker Grabsch <<EMAIL>> // Safety fixes // -- Eugene Hopkinson <slowriot at voxelstorm dot com> // Adapt for project // Dmitriy...
ALGO
0.97127
7.246578
86991d32-1b47-4a4e-80be-c63794c0a6f1
Next-Gen-UI/Hacktober
Leetcode/0592. Fraction Addition and Subtraction/0592.cpp
class Solution { public: string fractionAddition(string expression) { istringstream iss(expression); char _; int a; int b; int A = 0; int B = 1; // init: A / B = 0 / 1 // A / B + a / b = (Ab + aB) / Bb // so, each round set A = Ab + aB, B = Bb while (iss >> a >> _ >> b) { ...
ALGO
0.999518
6.380919
b5cac1f1-72c6-4f94-b88c-6d895d5f0dbc
dskleviathan/contest
POJ1995.cpp
#include <cmath> #include <iostream> using namespace::std; long long mod_pow(long long a, long long b, int m){//aのb乗をmで割った余りを求める long long ans = 1; while(b > 0){ if(b & 1) ans = ans * a % m; a = a * a % m; b = b >> 1; } return ans; } int main(){ long long z;//データセット数 ...
ALGO
0.999826
4.121732
749e4a03-9afe-423a-b373-28b2294d25e8
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0514/personal_submission/cf914c_CMing.cpp
#include<bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; const int N = 1001; typedef long long LL; LL C[N][N]; void init() { for(int i = 0; i < N; i++) { C[i][0] = 1; for(int j = 1; j <= i; j++) C[i][j] = (C[i-1][j-1] + C[i-1][j])%mod; } } int main() { init(); ...
ALGO
0.999989
4.139377
419b4d57-5434-4a9a-be12-ad449efcece8
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/August/ChefAndWars_20200807162345.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999938
3.803324
85ec4158-b87f-4ec6-aeb2-6014e2b1a5e8
Peeranut-Kit/algorithm-design-coding
brute_force/combination_exact/combination_exact.cpp
#include <iostream> #include <vector> using namespace std; void combi_exactK(int n, vector<int> &sol, int len, int k, int chosen) { if(len < n) { if (len - chosen < n - k) { sol[len] = 0; combi_exactK(n, sol, len+1, k, chosen); } if (chosen < k) { chosen ...
ALGO
0.999799
3.956681
622945bf-528b-4b70-9d3a-7a13101e9350
alexproger23/DataStructures
prj.codeforces/0276a.cpp
#include <iostream> int main() { int n,k = 0; int f,t = 0; int m = -1000000000; std::cin >> n >> k; for (int i = 0; i < n; i++) { std::cin >> f >> t; int ples = t > k ? f - t + k : f; if (m < ples) m = ples; } std::cout << m; }
ALGO
0.999959
3.839499
997241e5-9184-44f3-9a36-daa7ff4f079a
AlinaMollinedo/AlinaMollinedo_PRACTICA_02
Ejercicio_02_02.cpp
// Materia: Programación I, Paralelo 4 // Autor: Alina Molliendo Dávila // Fecha creación: 25/08/2023 // Fecha modificación: 25/08/2023 // Número de ejericio: 2 // Problema planteado: Escribir un programa que a partir de un arreglo constante de 10 elementos enteros, // determine el porcentaje de números pares posi...
ALGO
0.995999
4.51653
71df0513-553b-4ef1-a2a5-7766357374e2
guoliqiang/coding
third_part/boost/boost_1_53_0/libs/bimap/example/mi_to_b_path/bidirectional_map.cpp
// Boost.Bimap Example //----------------------------------------------------------------------------- // This example shows how to construct a bidirectional map with // multi_index_container. // By a bidirectional map we mean a container of elements of // std::pair<const FromType,const ToType> such that no two element...
ALGO
0.974615
6.412298
636e0e91-30e9-49de-89f2-da05abcd0927
MIPS/external-opencore
codecs_v2/audio/aac/dec/src/fft_rx4_short.cpp
/* Filename: fft_rx4_short.cpp Funtions: fft_rx4_short ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: Data = Input complex vector, arranged in the following order: real, imag, real, imag... This is...
ALGO
0.999808
5.071127
10f00a70-bb88-4bf1-a94a-866f2bbfd1b4
Redpanda10/start_dsa
pyramid_pattern.cpp
#include <iostream> using namespace std; int main() { for (int i = 0; i <= 3; i++) { for (int j = 0; j + i < 3; j++) { cout << " "; } for (int j = 1; j <= i + 1; j++) { cout << j; } for (int j = i; j > 0; j--) { ...
ALGO
0.999786
3.573881
546f3284-3f17-4c0e-aaa5-a30975e8ad03
ftwr42/whereitis_2
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.9988
6.76073
ca4f8372-22bf-4016-8374-aa7eb49a961d
aca123321/Competitive-Programming
sort the urls.cpp
#include<bits/stdc++.h> using namespace std; #define lli long long int #define pb push_back #define f first #define s second main() { lli n,i; map<string, lli> m; vector<pair<lli , string>> v; vector<lli> ind; string st; cin>>n; for(i=0;i<n;i++) { cin>>st; m[st]++; ...
ALGO
0.999928
3.419122
8fe46e3f-a96f-4ec7-9c4f-040e197701ca
MSP07/LeetCode-Solutions-CPLUSPLUS
FindFirstPlayerToWinKGames.cpp
//approach //iterate through array assuming first element to be the winner and increasing wins for every consecutive smaller elements //if we find a greater element we update the maxskill to the current index and consecWins to 1(as this element is greater than prev and as won the battle) //when the consecWins becomes k...
ALGO
0.999978
5.058544
380a4954-c0a0-41d1-9c12-d83fba25621a
raptor-mvk/ACM
v.2011/Solutions_new/1012.cpp
#include <iostream> #include <iomanip> using namespace std; class huge { private: static const int FOUNDATION=10000; static const int MAX_LENGTH=50; int *number; int length; void shift(int count); void mul(int number,int shift); int &operator[](int index) { return this->number[index]; } public: static ...
ALGO
0.999983
3.438674
7ad2afb9-bd69-4a9b-9382-61b452bb7e63
afterlife69/OwlCoder3
0931-minimum-falling-path-sum/0931-minimum-falling-path-sum.cpp
class Solution { public: int minFallingPathSum(vector<vector<int>>& dp) { int n = dp.size(), m = dp[0].size(); if(n == 1)return *min_element(dp[0].begin(),dp[0].end()); int ans = 1e9; for(int i=1;i<n;i++){ for(int j = 0;j<m;j++){ int l = (j == 0) ? 1e9 : d...
ALGO
0.999982
6.154488
11589c44-2f23-4278-a4c9-6ae26346c333
vekariya123456/vekariya_cpp
operator_overloadingexp.cpp
#include<iostream> using namespace std; class BOX { int lenght,height,breath; public: void setdata(int l, int h, int b) { lenght= l; height= h; breath= b; } BOX operator+(BOX &b) { BOX box; box.lenght=lenght + b.lenght; box....
TOOL
0.928632
3.845847
afff09a7-a5c9-4cb4-8858-73075ca03d53
ishandutta2007/codeforces
aoligei/normal/1486/B.cpp
//#include <bits/stdc++.h> #include <iostream> #include <iomanip> #include <math.h> #include <cmath> #include <algorithm> #include <climits> #include <functional> #include <cstring> #include <string> #include <cstdlib> #include <ctime> #include <cstdio> #include <vector> #include <stack> #include <queue> #include <dequ...
ALGO
0.999914
3.324316
d66a51a1-3995-4aa5-b371-745f7b20bce2
ithallotulio/competitive-solutions
beecrowd/1-beginner/2172.cpp
#include <bits/stdc++.h> using namespace std; int main() { int multiplier; long long int exp; while ((cin >> multiplier >> exp) && (multiplier != 0 || exp != 0)) { cout << multiplier * exp << endl; } return 0; }
ALGO
0.999782
3.897417
98f2bc13-cabb-49ce-8266-b3079ad036bc
Tingwei0512/llvm-19
llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
#include "llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Object/COFF.h" #include "llvm/Object/COFFImportFile.h" #include "llvm/Object/COFFModuleDefinition.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/OptTable.h" #include "llvm/O...
TOOL
0.935631
7.709555
7c659723-6216-41a1-aa8a-0b67ef1704c0
RafigRzayev/nrf5sdk_edge_impulse_demo
ble_app_blinky/edge_impulse/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp
#include "_kiss_fft_guts.h" /* The guts header contains all the multiplication and addition macros that are defined for fixed or floating point complex numbers. It also delares the kf_ internal functions. */ static void kf_bfly2( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_cfg ...
ALGO
0.999594
5.378069
7de131ab-6d78-4936-b580-a5b6fa5b5509
MarwanMoh11/University-work
d/Problem-9.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; bool file_ordered(string infile) { string prev_word = "";// initialize the previous word to an empty string string word; ifstream file(infile); while (file >> word) { if (prev_word > word) {// if the current word is s...
ALGO
0.981272
5.538407
8357f465-11e6-4133-b756-50811121c70c
BocdanQc/MySolutions
Coderbyte/QuestionMarks.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Author: Daniel Emond // // Description: My C++ solutions to the Question Marks problem from Coderbyte: // https://coderbyte.com/information/Questions%20Marks // //////////////...
ALGO
0.999673
4.641764
2fa385cb-1315-467d-bbf6-30164c9a0ca6
dudeknight/code
cpp/string_trans.cpp
//the template by dvdreddy #include <vector> #include <queue> #include <deque> #include <map> #include <iostream> #include <cstring> #include <string> #include <math.h> #include <cstdio> #include <cstdlib> #include <algorithm> using namespace std; #define s(x) scanf("%d",&x) #define sll(x) scanf("%lld",&x) #define s...
ALGO
0.999779
3.761806
3ad31ee4-aacf-49d7-aaad-250f4fe56e18
pradyumn07/LeetCode
0820-find-eventual-safe-states/0820-find-eventual-safe-states.cpp
class Solution { public: vector<int> eventualSafeNodes(vector<vector<int>>& graph) { int V=graph.size(); vector<int> indegree(V,0); vector<vector<int>> graphrev(V);; for(int i=0;i<V;i++){ for(auto it:graph[i]){ graphrev[it].push_back(i); in...
ALGO
0.999996
6.002364
15b9a6ed-8458-4b2d-89e4-4d19bab3f3dc
raincross7/code-similarity
codes/train_code/problem349/problem349_274.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <cassert> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define rep(i,n) FOR(i,0,n) #define DEBUG(x) cout<<#x<<": "<<x<<endl #define vint vector<int> #define vdouble vector<double> #define vs...
ALGO
0.999952
4.44397
fd8f3242-0b47-49ad-99a5-683b26588894
hackybacky/my-leet
2141-maximum-running-time-of-n-computers/2141-maximum-running-time-of-n-computers.cpp
typedef long long ll; class Solution { public: ll maxRunTime(int n, vector<int>& batteries) { auto check=[&](ll mid){ ll val=0; for(auto it :batteries){ val+=min(mid,(ll)it); } ll d=n*mid; return val>=d; }...
ALGO
0.999945
5.894003
62e46f84-8bd7-4b60-aee8-c19ef7f8eee2
jash459/DSA-BUSTED
Reverse Odd Levels of Binary Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999992
6.019051
62ac22d3-59b5-4a60-9746-8a03f5f39353
shafayethossai/Graph
DFS.cpp
// 6 5 // 1 2 // 2 3 // 2 4 // 4 5 // 4 6 #include <bits/stdc++.h> using namespace std; vector<int> graph[1002]; int vis [1003]; void DFS (int node){ vis[node] = 1; cout << node << " -> "; for(int i = 0; i < graph[node].size(); i++){ int child = graph[node][i]; if(vis[child] == 0){ ...
ALGO
0.999918
4.784334
9ec15f37-640c-47b9-bb3a-f14fe1a3f965
devgoel186/Leetcode-Solutions
car-fleet/Wrong Answer/8-6-2021, 3_30_10 AM/Solution.cpp
// https://leetcode.com/problems/car-fleet class Solution { public: // bool check(int a, int b, int s1, int s2, int target) // { // int x = a; // int y = b; // while((x + s1 <= target) && (y + s2 <= target)) // { // if((x + s1) == (y + s2)) // return ...
ALGO
0.999647
6.002305
a205468c-afc1-49f8-99d3-25494b1a5820
Sharma8aditya/DSA
0347-top-k-frequent-elements/0347-top-k-frequent-elements.cpp
class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { vector<int> ans; int count = 0; unordered_map<int, int>mp; for(int i = 0;i<nums.size();i++){ mp[nums[i]]++; } //create a multimap multimap<int,int, greater<int>>...
ALGO
0.999989
6.09022
937080d1-1ff1-485b-a8de-89ab13352573
ishandutta2007/codeforces
golovanov399/normal/1428/F.cpp
#include <bits/stdc++.h> #define itn int #define all(x) (x).begin(), (x).end() #define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin()) #define random_shuffle(...) shuffle(__VA_ARGS__, rng) #define rand() rng() #ifdef OLBOEB #define return std:...
ALGO
0.99999
4.37872
4f4a468a-1753-4752-a1b2-6eb26fadfdd4
pingjuiliao/OTI
llvm-project/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<class T, output_iterator<const T&> O, sentinel_for<O> S> // constexpr O ranges::fill(O first, S last, const T& value); // template<class T, output_range<const T&> R> // constexpr borrowed_iterator_t<R> ranges::fill(R&& r, const T& value); #inc...
TEST
0.877196
7.499312
b221b2b4-c6fa-4695-9658-6c9a1a52a678
Kristoff-starling/OJ-Programmes
GYM/GYM103495 (JSCPC 2021)/[GYM103495A]Spring Couplets.cpp
#include <bits/stdc++.h> #define rep(i,a,b) for (int i=(a);i<=(b);i++) using namespace std; int n,a[100],b[100]; int main () { int ca;scanf("%d",&ca); while (ca--) { scanf("%d",&n);string s; rep(i,1,n) cin>>s,a[i]=s[int(s.size())-1]-'0'; rep(i,1,n) cin>>s,b[i]=s[int(s.size())-1]-'0...
ALGO
0.999724
3.149111
dcabee5a-064f-4210-b68f-4a19a6c0d9c8
gobendo999/Map_Codeforce_Problame
Almost_Increasing_Subsequence.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; int32_t main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,q; cin >> n >> q; vi a(n); for(int& i : a) ci...
ALGO
0.999947
4.211671
58c6fe91-06e9-48c4-b506-2bebbb6339c0
jkoppel/medicalinfo
AbsTestDataMan_vs2005/AbsTestDataMan/Mime/Mime.cpp
////////////////////////////////////////////////////////////////////// // // MIME message encoding/decoding // // Jeff Lee // Dec 11, 2000 // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MimeCode.h" #include "MimeChar.h" #include "Mime.h" #include <stdlib.h> #incl...
TOOL
0.950457
5.578868
c97ac69e-6560-4d39-93f7-262b39489f5e
live-in-the-moment/OpenCV-4.8-moment
3rdparty/carotene/src/fill_minmaxloc.cpp
#include "common.hpp" namespace CAROTENE_NS { #ifdef CAROTENE_NEON namespace { template <typename T> void process(const T * src, size_t j0, size_t j1, size_t i, T minVal, size_t * minLocPtr, s32 & minLocCount, s32 minLocCapacity, T maxVal, size_t * maxLocPtr, s32 & maxLocCount, s32 maxLocC...
ALGO
0.997424
3.534907
3ce0bb48-126c-482d-9a3c-e8fb733a1e12
Sarwvidya/30DayCoding
0107-binary-tree-level-order-traversal-ii/0107-binary-tree-level-order-traversal-ii.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999969
6.484618
4619604a-e8b9-4425-951a-efdc099b3f78
koralkulacoglu/CompetitiveProgramming
CCC/2023/S4.cpp
/* ID: Koral Kulacoglu TASK: test LANG: C++ */ #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef long double lld; typedef complex<ld> cd; typedef pair<int, ...
ALGO
0.999928
3.923686
5d929c40-bd44-49e0-94a5-bb4d77b1bdb6
troyliu0105/eigen
test/sparse_permutations.cpp
static long int nb_transposed_copies; #define EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN {nb_transposed_copies++;} #define VERIFY_TRANSPOSITION_COUNT(XPR,N) {\ nb_transposed_copies = 0; \ XPR; \ if(nb_transposed_copies!=N) std::cerr << "nb_transposed_copies == " << nb_transposed_copies << "\n"; \ VERIFY( (#XPR...
TEST
0.902838
6.328657
c145fa40-c886-433f-84c4-6a4b383eb963
Rohanraj29/CODING-PRACTISE-CPP
1D-ARRAY/reverseArray.cpp
//WAP TO REVERSE AN ARRAY. #include <iostream> using namespace std; int main() { int a[4]={2,4,6,8}; cout<<"Array in reverse order are:-"<<endl; for(int i=3;i>=0;i--){ cout<<a[i]<<endl; } return 0; }
ALGO
0.985187
3.578665
a041e4b9-b0bb-4916-b5c2-2997c851e85d
ishandutta2007/codeforces
redstar_13/normal/991/B.cpp
#include<bits/stdc++.h> #define ep 1e-8 #define NN 110 using namespace std; int n; int a[NN]; int main () { #ifndef ONLINE_JUDGE freopen("in.in","r",stdin); freopen("out.out","w",stdout); #endif scanf("%d", &n); for(int i=0; i<n; i++) scanf("%d", &a[i]); sort(a,a+n); double sum=0.0; for(int i=0; i<n; i++) sum+...
ALGO
0.999953
3.32197
9d1df4c1-ca37-409c-970d-b28d92f36f2a
dhnesh12/codechef-solutions
02-CodeChef-Easy/957--The Tricky Deal.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { // your code goes here int n; cin>>n; while(n--) { long long int d; cin>>d; //int bal = 0; int i=1; long long int taken = d; long long int given = 1; long long int bal = taken-given; long long in...
ALGO
0.999866
3.390067
ffc50408-8295-42cf-b580-06ad08d1b17d
vishnu510/LeetCode_Problem
912-sort-an-array/912-sort-an-array.cpp
class Solution { public: vector<int> sortArray(vector<int>& nums) { sort(nums.begin(),nums.end()); return nums; } };
ALGO
0.999895
5.823213
f6dd0c19-acfc-43f4-94f8-a99d4ab9eb53
HitarthThakkar/LeetCode-Submissions
0101-symmetric-tree/0101-symmetric-tree.cpp
class Solution { private: bool recur(TreeNode* p, TreeNode* q) { if(p == NULL && q == NULL) return true; if(p == NULL || q == NULL) return false; if(p->val != q->val) return false; bool op1 = recur(p->left, q->right); bool op2 = recur(p->right, q->left); return (o...
ALGO
0.99999
6.151737
166f60dc-126f-4a38-bc67-56f60c34872c
aanjaneykumarverma/CSES
Dynamic_Programming/Counting_Tilings.cpp
#include <bits/stdc++.h> #define MOD (1000000000 + 7) #define ll long long using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int n, m; cin >> n >> m; vector<vector<int>> comp(1 << n, vector<int>(1 << n, 0)); for (...
ALGO
0.999986
4.808147
146f03f8-bd12-493c-90de-a1fc4e6d9414
Trgtuan10/Applied_Algorithms
Max_distance_sub_sequence.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 1e5 + 1; int n, c; int t; int x[MAXN]; int choose[MAXN]; void input() { cin >> n >> c; for (int i = 0; i < n; i++) cin >> x[i]; sort(x, x + n); } bool check(int k) { int last = x[0]; int count = 1; for (int i = 1; i < n; i++) { ...
ALGO
0.999993
4.420074
37dd2ba0-ea30-44e4-a2f3-c2a9c357e4ef
YaeSaraki/OI
Algorithms/AcWing/每日一题/2023春季每日一题/Week 1/4956. 冶炼金属.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int n ; cin >> n ; int minn = 0 , maxx = 2e9 ; for(int i = 1 ; i <= n ; i ++) { int a, b ; cin >> a >> b ; int r = a / b , l = a / (b + 1) + 1; minn = max(minn , l) , maxx = min(maxx , r) ; } cout << minn << ' ' <...
ALGO
0.999867
4.514075
1b8a8b8b-2411-4724-8372-93cfe60e4fb8
lihanxu/OpenGLSuperBible
GLTools/src/math3d.cpp
// math3d.cpp // Math3D Library, version 0.95 // Implementation file for the Math3d library. The C-Runtime has math.h, these routines // are meant to suppliment math.h by adding geometry/math routines // useful for graphics, simulation, and physics applications (3D stuff). // This library is meant to be useful on Win...
ALGO
0.998106
6.315026
bd949f66-73ec-487e-be95-c5fc92c197f1
abelshanoj/codeforce-problems-cpp
Day4/ugly-string.cpp
#include <bits/stdc++.h> using namespace std; main() { int T; cin >> T; while (T--) { int n, count = 0; cin >> n; string s; cin >> s; for (int i = 0; i < n - 2; i++) { if (i <= n - 3 && s.substr(i, 4) == "mapie") count++; else if (s.substr(i, 3) == "map" || s.substr(i, 3) == "pie") count+...
ALGO
0.999204
3.693173
c4f5a603-0c21-4e53-8859-e3ae6f220714
wangnianwu/openjdk8u
jdk/src/windows/native/sun/bridge/jabswitch.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <Windows.h> #include <tchar.h> // This is the default buffer size used for RegQueryValue values. #define DEFAULT_ALLOC MAX_PATH // only allocate a buffer as big as MAX_ALLOC for RegQueryValue values. #define MAX_ALLOC 262144 static...
TOOL
0.857406
4.170514
0a13d361-6aaa-4662-9664-5dee57a21f15
sarvex/leetcode-free-basic
solution/0000-0099/0003.Longest Substring Without Repeating Characters/Solution.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { unordered_set<char> ss; int i = 0, ans = 0; for (int j = 0; j < s.size(); ++j) { while (ss.count(s[j])) ss.erase(s[i++]); ss.insert(s[j]); ans = max(ans, j - i + 1); } return...
ALGO
0.999896
6.186007
0fe0a019-da57-40c9-95b1-3e8eebeb99c5
gbchap/exercicios
aulas.cpp/019.cpp
//Construa um programa que leia dois valores //reais x e y, calcule e imprima os valores de w e //z de acordo com as fórmulas: //w = (2x + y)/2 e z = 1/w //Faça o teste de mesa para as entradas x = 1.5 //e y = 2.0. #include <iostream> using namespace std; int main() { float x; float y; float w; flo...
ALGO
0.982237
3.799575
01174f07-7254-4ccc-a328-211482413f70
crs7617/leetcode-q-s
lc49.cpp
class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { unordered_map<string,vector<string>> mp; for(string s:strs){ string t=s; sort(t.begin(),t.end()); mp[t].push_back(s); } vector<vector<string>> anagrams; ...
ALGO
0.999992
6.471073
e887d17a-e426-42b4-87d6-6f2e025ed56a
Ferrrbi/npgrupa2
gr2/mnozenie.cpp
#include <iostream> using namespace std; void mnozenie() { extern int x; extern int y; cout<<"Iloczyn liczb " << x << " i " << y << " wynosi " << x*y; cout<<"Iloczyn liczb " << x <<" i " << y << " wynosi " << x*y; }
TOOL
0.933266
3.133904
37a47390-dadf-4304-b44e-8c52359e7fd6
eversongs/c-study
MST/MST/DisjointSet.cpp
#include "DisjointSet.h" void unionSet(DisjointSet* set1, DisjointSet* set2) { set2 = findSet(set2); set2->parent = set1; }; DisjointSet* findSet(DisjointSet* set) { while (set->parent != NULL) { set = set->parent; } return set; }; DisjointSet* makeSet(void* newData) { DisjointSet* newSet = (DisjointSet*)mall...
ALGO
0.988417
4.046099
3d313b41-157c-4c24-83b4-c1027bca57e1
AriukCS1A/Ariunzul
power.cpp
#include<stdio.h> int power (int base, int n){ if (n == 1) return base; else { int result = power (base, n-1) * base; return result; } } int main (){ int base = 10; int n = 5; printf ("%d", power (base, n)); return 0; }
ALGO
0.999913
4.349191
3cc8559b-a01a-49fc-8fa9-173db7da980f
chx2502/LeetCode
LeetCode_797_所有可能的路径/LeetCode_797_所有可能的路径/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: /* 惊了,写成这样也能过??? 递归实现,先算了各个点的可达性,极大地拖慢了速度。 **/ bool havePath(vector<vector<int>>& graph, int a, int b, vector<bool>& map) { if (a == b) { map[a] = true; return true; } ...
ALGO
0.999928
5.441596
e81b0fb2-9c62-42d2-842b-f40cfcdf872f
algebrakart/algebrakart-engine
Urho3D/Source/ThirdParty/angle/third_party/SwiftShader/third_party/llvm-7.0/llvm/lib/CodeGen/MachineSink.cpp
#include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SparseBitVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineBlockFrequencyInfo.h" #include "llvm/C...
ALGO
0.99972
7.792411
a0dd7827-4ff2-4c85-8073-55bdca58a1cc
kawser25350/Problem-Solving
codeshef and codeforces contest/POW.cpp
#include<bits/stdc++.h> using namespace std; string solve(int A,int B, int C){ int sign1=(A<0 && C%2); int sign2=(B<0 && C%2); string ans; if(sign1!=sign2){ ans=sign1? "<": ">"; } else{ if(abs(A)==abs(B)){ ans="="; } else if((abs(A)<abs(B)) ^ sign1){ ...
ALGO
0.999995
4.823932
27a4a107-8490-4221-92a0-0a83f370e9a9
harshit2017/hackerBlocks
selectio_sort_ll.cpp
//selectio_sort_ll.cpp #include <iostream> //#include <cstring> //#include <algorithm> using namespace std; class node { public://as they need to be accessed outside the function node(int d)//constructor { data = d; next = NULL; } int data;//data of node node *next;//pointer to next node }; node* insertion...
ALGO
0.999876
4.557003
e3f47dcf-afd9-42b0-b83d-739d1119b51f
fuyu-0/-
数据结构代码库/数据结构实验/线性表/实验3/dlinklist.cpp
//双链表运算算法 #include <stdio.h> #include <malloc.h> #include "dlinklist.h" void CreateListF(DLinkNode *&L, ElemType a[], int n) //头插法建双链表 { DLinkNode *s; L = (DLinkNode *)malloc(sizeof(DLinkNode)); //创建头结点 L->prior = L->next = NULL; for (int i = 0; i < n; i++) { s = (DLinkNode *)malloc(sizeof(DLinkNode)); //创建新结点 ...
ALGO
0.999877
3.244851
5f0354c8-28df-41a3-b350-880d5a39f7ce
kakliniew/PEA-projekt-1
Matrix.cpp
#include "pch.h" #include "Matrix.h" #include <fstream> #include <string> #include <iostream> using namespace std; Matrix::Matrix() { size = 0; } Matrix::~Matrix() { for (int i = 0; i < size; i++) { delete[] table[i]; } delete[] table; } void Matrix::loadMatrix(string name) { ifstream plik; plik.open(name,...
ALGO
0.98883
3.017665
6b6f5f56-4b85-4c3b-b1d0-92d564087bae
sandyg6/Problem-Practice
26/26.cpp
#include<iostream> #include<math.h> using namespace std; int checkPronic(int n){ for(int i=1;i<sqrt(n);i++){ if(i*(i+1)==n) return true; } return false; } int main(){ int n; cout<<"Enter a number:"; cin>>n; if(checkPronic(n)){ cout<<"The given number is Pronic"<<e...
ALGO
0.995104
3.650403
a2959870-dbf1-494f-b7d3-7722448fb6d0
gaopj/leetcode
leetcode1-50/019_Remove Nth Node From End of List/源.cpp
#include<stdlib.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { int count = 0; ListNode *p = head; while (p) { count++; p = p->next; } int pos = count - n; ...
ALGO
0.999951
5.194426
737d11bc-1666-4d61-b20c-a0c24490e199
ishandutta2007/codeforces
derekfeng/normal/718/A.cpp
#include <algorithm> #include <cstdio> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> #include <map> #include <set> #include <iomanip> #include <ma...
ALGO
0.999916
4.009372
9cc973e3-35ea-450b-838d-2ff5593140c1
Shivuu2803/LeetCode-Problems
37-reverse vowel of string.cpp
class Solution { public: string reverseVowels(string s) { int l = 0; int r = s.length() - 1; while (l < r) { while (l < r && !isVowel(s[l])) { ++l; } while (l < r && !isVowel(s[r])) { ...
ALGO
0.999841
6.774138
fab0e59c-4c35-4e74-a1f2-2d88d7512119
Ryansmg/CodingPractice
Baekjoon/4_platinum/p3_18407_lazyprop.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> #define ui long long #define vec vector<ui> using namespace std; //18407. 가로 블럭 쌓기 //#lazyprop #coordinate_compression (값/좌표 압축) void update_lazy(vec &tree, vec &set_lazy, ui node, int start, int end) { if(set_lazy[node] != -1) { ...
ALGO
0.999736
4.393283
5464b061-7bee-4b4a-a6ee-5adf38cf0ecc
naveengitboi/cp
codes/arrays/fourSum.cpp
#include <bits/stdc++.h> #include <iostream> #include <unordered_map> using namespace std; #define vvi vector<vector<int>> #define vi vector<int> vvi fourSum(vi& nums, int target){ vvi ans; int n = nums.size(); sort(nums.begin(), nums.end()); for(int i = 0; i< n; i++){ if(i > 0 && nums[i] == n...
ALGO
0.99966
5.559155
c7d15a67-0308-46f0-b5bd-934224b48d41
TensorMD/lammps-tensormd
src/MESONT/pair_mesocnt.cpp
/* ---------------------------------------------------------------------- Contributing author: Philipp Kloza (University of Cambridge) <EMAIL> ------------------------------------------------------------------------- */ #include "pair_mesocnt.h" #include "atom.h" #include "comm.h" #include ...
ALGO
0.99934
6.10111
75d86d0e-28c2-41dc-983f-0a05bc11ea4a
ADS-bot/Leetcode
1092-maximum-difference-between-node-and-ancestor/1092-maximum-difference-between-node-and-ancestor.cpp
class Solution { public: int maxAncestorDiff(TreeNode* root) { return maxAncestorDiff(root, root->val, root->val); } private: // Returns |max - min| of the tree w/ root int maxAncestorDiff(TreeNode* root, int mini, int maxi) { if (root == nullptr) return 0; mini = min(mini, root->val); ...
ALGO
0.999672
6.947235
4737b408-9ecf-4132-8701-62061a58e774
kartikeyaGUPTA45/C-Plus-Plus-Programming-Language
LinkedList/Circular Linked List/delete.cpp
#include<iostream> using namespace std; struct Node { int data; struct Node *next; }*Head; void Create(int A[],int n) { int i; struct Node *t,*last; Head=new Node; Head->data=A[0]; Head->next=Head; last=Head; for(i=1;i<n;i++) { t= new Node; t->data=A[i]; ...
ALGO
0.999887
4.343669
9fdc8388-04ab-4f3d-9c44-6d2df4d51c41
raincross7/code-similarity
codes/train_code/problem466/problem466_437.cpp
#include <bits/stdc++.h> using namespace std; int main(void){ long long int n,a[3],i; for(i=0;i<3;i++) { cin >> a[i]; } sort(a,a+3,greater<int>()); if(a[1]%2!=a[2]%2) { cout << ((a[0]-a[1])+(a[0]-a[2]))/2+2 << endl; } else { cout << ((a[0]-a[1])+(a[0]-a[2]...
ALGO
0.999864
3.783894
6b12d434-9ef3-48cd-a839-62155e293a16
NirajD04/DSA
238-product-of-array-except-self/product-of-array-except-self.cpp
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int n = nums.size(); vector<int> result(n); vector<int> left(n); vector<int> right(n); left[0]=1; for (int i = 1; i < n; i++) { left[i]=left[i-1]* nums[i-1]; } r...
ALGO
0.999962
6.375487
6331862e-a40e-472c-9627-f1d2f0166219
Seddvwy/Celebrity-Image-Classification
opencv-master/modules/ml/src/lr.cpp
// // This is a implementation of the Logistic Regression algorithm // #include "precomp.hpp" using namespace std; namespace cv { namespace ml { class LrParams { public: LrParams() { alpha = 0.001; num_iters = 1000; norm = LogisticRegression::REG_L2; train_method = LogisticRe...
DATA
0.997922
7.460437
7698ce34-ad18-4216-a3d5-2a8c574714c1
fdj32/fork_samples
cppreference/w/cpp/numeric/random/binomial_distribution.cpp
#include <iostream> #include <iomanip> #include <string> #include <map> #include <random> int main() { std::random_device rd; std::mt19937 gen(rd()); // perform 4 trials, each succeeds 1 in 2 times std::binomial_distribution<> d(4, 0.5); std::map<int, int> hist; for (int n = 0; n != 10000; +...
ALGO
0.992455
4.044684
bd99def6-3f13-4dda-8f3f-478c505b63af
closekn-sandbox/EvolutionaryComputation
DE/DE.cpp
#include <bits/stdc++.h> using namespace std; #define M 30 // 個体数 #define D 5 // 解の次元 double Cr = 0.9, Fw = 0.5; // DEのパラメタ int Tmax = 1000; // 最大繰り返し回数 double Fend = 1e-5; // 終了条件 double Xmin = -5, Xmax = 5; // 範囲 double X[M][D], Xnew[M][D]; // M個×D次元の配列 double V[D], U[D]; ...
ALGO
0.999978
4.987746
e53565e9-7a9c-470c-8421-f7b2a1989913
lucianoscarpaci/Programming-in-Cpp
6.37.cpp
#include<iostream> using namespace std; int fibonacciLoop(int); int main() { int number; //output enter the number cout<<"Enter the number: "; cin>>number; //output the result and call fibonacci loop cout<<"The result is: "<<fibonacciLoop(number); return 0; } int fibonacciLoop(int Number) ...
ALGO
0.999504
4.290816
fb70e0e7-53a7-4c1e-b35f-9f65548a4ec2
EduFreit4s/TEC-PROGRAMACAO-2019.2
LISTAS/lista_3/q1/q1.cpp
#include <vector> #include <iostream> using namespace std; int main(){ int x; vector <int> inteiro; cout << "Digite numeros inteiros: "; while(cin >> x){ inteiro.push_back(x); } for(auto elemento : inteiro){ cout << elemento << " "; } system("pause"); return 0; ...
TOOL
0.873668
3.813408
73d5dbbc-107f-40d4-ba06-d3d202343506
quocnguyenx43/data-structure-algorithm
data_structure_algorithms/search/orther_search/exponential.cpp
// exponential search // _ ____ __ _ _ __ // (_/_(_(_(_)(__ / (_(_/_(_(_(_/__(/_/ (_ // /( .-/ .-/ // (_) (_/ (_/ #include "../_library_search_.h" // Độ phức tạp: // Time: O(logn) | Memory: O(1) // Ưu điểm: // - Phiên bản kết hợp giữa BS ...
ALGO
0.99999
5.436721
ba8c488a-f668-4941-a252-1b5276f7d079
Harman061/Leetcode
242-valid-anagram/valid-anagram.cpp
class Solution { public: bool isAnagram(string s, string t) { if (s.length() != t.length()) { return false; } vector<int> freq(26, 0); for (int i = 0; i < s.length(); i++) { freq[s[i] - 'a']++; freq[t[i] - 'a']--; } ...
ALGO
0.999989
6.710606
fc47124a-6fe0-4c9c-a660-f739366678db
zhouzhenghui/openskia
sgl/SkScan_Antihair.cpp
#include "SkScan.h" #include "SkBlitter.h" #include "SkColorPriv.h" #include "SkRegion.h" #include "SkFDot6.h" #define HLINE_STACK_BUFFER 100 //#define TEST_GAMMA #ifdef TEST_GAMMA static uint8_t gGammaTable[256]; #define ApplyGamma(table, alpha) (table)[alpha] static void build_gamma_table() ...
TOOL
0.906121
3.282631
5a928e98-b58b-4e6e-8703-ed5a34d9ddeb
TanishqRawat0112/Graphs
TopologicalSort/Kahn's Algorithm/topo_sort_using_BFS.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; vector<int>kahn_topo(vector<vector<int> >&adj,vector<int>&indegree,int n,int m){ queue<int>q; for(int i=0;i<n;i++){ if(indegree[i]==0){ q.push(i); } } vector<int>ans; while(!q.empty()){ int ...
ALGO
0.999998
5.525263
d437bb55-a8fa-4574-9cbc-46a94360b2d8
SayemImran/XPSC
WEEK1/L_gaming.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int n; cin >> n; int count_1 = 0; vector<int> v(n); for(int i = 0; i < n; ++i) { cin >> v[i]; if(v[i] == 1) { count_1++; } ...
ALGO
0.999898
4.462705
c2f348ce-701b-4725-83fd-11b412c1a576
githubname1953/test
BOX2D/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp
#include "Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h" #include "Box2D/Common/b2BlockAllocator.h" #include "Box2D/Dynamics/b2Fixture.h" #include "Box2D/Collision/Shapes/b2ChainShape.h" #include "Box2D/Collision/Shapes/b2EdgeShape.h" #include <new> b2Contact* b2ChainAndPolygonContact::Create(b2Fixture* fixtureA...
ALGO
0.993157
6.338943
e0e2b45e-bab0-48bf-883a-72c7a691f88e
wgoni/BOJ
BOJ/sources/1/1000/11022.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; int main() { cin.tie(NULL); ios::sync_with_stdio(false); freopen("11022.txt", "r", stdin); int test_case, a, b; cin >> test_case; for (int tc = 1; tc <= test_case; ++tc) { cin >> a >> b; cout << "Case #" << tc << ": " <<a <<" + " << b...
ALGO
0.901352
5.432932
6af2f7f4-9874-4c56-b7d1-50f15b15535f
OmerSoydinc/CPP_Ornekler
44_Random Sayı Üretme Oyunu .cpp
#include<iostream> #include<locale.h> #include<stdlib.h> #include<time.h> #include<conio.h> using namespace std; void oyun(); //Oyun adnda bir fonksiyon tanmlanmtr. int main() { setlocale(LC_ALL,"Turkish"); //Trke karakterler aktif hale getirilmitir. int tus; oyun(); ...
TOOL
0.91657
3.37048
b9de648d-e0f3-4e5f-b396-af38cfaaccba
austinyu2019/learncpp
c_advance/9-2字符串中次数第二多的字母.cpp
#include <iostream> #include <cctype> using namespace std; struct Alphabet { char letter; // 字母,不区分大小写 int fisrtShowIndex; // 第一次出现的index int count; // 字母出现的次数 bool show; // 字母是否出现 }; int main() { char str[500]; cin.getline(str, 500); // 字母表初始化 Alphabet alphabet[26]; for (int i = 0; i < 26; i++) { //a...
ALGO
0.999663
3.848783
01f2f674-3700-4bce-9e50-bd834fbcbd9b
vladwlr/lab8_oop_makarenko
Source.cpp
#include <iostream> class Triad { protected: int a, b, c; public: Triad(int x, int y, int z) : a(x), b(y), c(z) {} bool operator==(const Triad& other) const { return (a == other.a && b == other.b && c == other.c); } bool operator<(const Triad& other) const { return (a < other.a) ...
TOOL
0.944998
6.312088
979c5deb-f9be-4b7f-a02d-65bb5cc2299a
joe-desimone/patriot
patriot.cpp
#include "patriot.h" #include "nt.h" char PATRIOT_VERSION[] = "v0.3"; std::vector<UPFinding> Findings; LOG_LEVEL logLevel = info; void Log(LOG_LEVEL level, const char* fmt, ...) { if (level < logLevel) { return; } int result; va_list va; va_start(va, fmt); result = vprintf(fmt, va...
TOOL
0.885361
4.598092
3326f9ec-2146-4567-933b-f3549dececd0
EdzG/CS125programs
CIS126Test1/CIS126Test1cpp.cpp
//Eder Guerrero //13 February 2021 #include <iostream> #include <string> using namespace std; /* class Flowers { private: //Data members string name; int quantity; double cost; //member functions //constructors Flowers() { name = "flower"; quantity = 0; cost = 0; } Flowers(string flowerName, int fl...
TOOL
0.969546
4.285007
6a554bf3-9139-4c78-9830-09b16b2008e1
muzee99/Baekjoon_cpp
BOJ1780.cpp
// BOJ1780_종이의 개수 // 20924KB // 356ms #include <bits/stdc++.h> using namespace std; int N, paper[2200][2200], cnt[3]; int isPaper(int row, int col, int n) { int kind = paper[row][col]; for(int i=0; i<n; i++) for(int j=0; j<n; j++) if(kind != paper[row+i][col+j]) return -2; return kind; } void cutPa...
ALGO
0.999496
3.644281
34c55d0f-6c2b-4fa8-b8b1-7d8b70e06239
iamarchit2/DataStructuresAndAlgorithms
Arrays/ISSECONDMIRRORINVERSEOFFIRST.cpp
#include <iostream> using namespace std; int main(){ int N; cin >> N; int array1[N]; for (int i = 0; i < N; i++) { cin >> array1[i]; } int array2[N]; for (int i = 0; i < N; i++) { cin >> array2[i]; } for (int i = 0; i < N; i++) { int idxtocheck = array1[i]; ...
ALGO
0.999794
3.464879
6c01b1bf-bf03-4073-9b30-a0593e8a7b8e
OptimusRahul/data-structrues-and-algorithms
data-structures/a) basic/logic/star-pattern-1.cpp
/* * * * * * * * * * */ #include <iostream> using namespace std; void nForest(int n) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout << "*" << " "; } cout << endl; } } int main() { int n; cin >> n; nForest(n); return 0; }
ALGO
0.99959
3.764585
3b96111e-548f-4667-a633-f2b4760d9c29
AMReX-Codes/amrex
Tests/GPU/CNS/Source/CNS_derive.cpp
#include "CNS_derive.H" #include "CNS.H" #include "CNS_parm.H" using namespace amrex; void cns_derpres (const Box& bx, FArrayBox& pfab, int dcomp, int /*ncomp*/, const FArrayBox& rhoefab, const Geometry& /*geomdata*/, Real /*time*/, const int* /*bcrec*/, int /*level*/) { auto c...
ALGO
0.969372
5.178379
c72259e4-f790-497f-8ed6-b998adb697ac
ishandutta2007/codeforces
i_love_tanya_romanova/normal/1038/C.cpp
/* Kill for gain or shoot to maim But we don't need a reason The Golden Goose is on the loose And never out of season Blackened pride still burns inside This shell of bloody treason Here's my gun for a barrel of fun For the love of living death The killer's breed or the Demon's seed, The glamour, the fortune, the pain...
ALGO
0.999959
3.320701