uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e55c8140-a427-4129-a688-e932362c5641
Shrutimehta-13/6Companies30Days
Walmart/Question6.cpp
#include <bits/stdc++.h> #define mod 1000000007 using namespace std; long long power(long long x, long long y) { long long result = 1; while (y > 0) { if (y % 2 == 0) { x = (x % mod * x % mod) % mod; y = y / 2; } else { result = (...
ALGO
0.999998
5.628566
e307f318-4555-4622-9c96-9c2e0693366f
meoyushi/cp-problems
GCD1.cpp
#include<iostream> #include<vector> #include<string> #include<cmath> #include<algorithm> #include<cstring> using namespace std; #define ll long long vector<int> sieve_algo(ll z) { vector<bool> isPrime(z+1,true); isPrime[0]=isPrime[1]=false; for(int i=2;i*i<=z;i++) { if(isPrime[i]) { fo...
ALGO
0.999703
4.134874
e005032d-01c8-45b5-8d4f-ab02bf127d33
ChanJoon/mpcc
qp_solver/qpoases/SRC/Indexlist.cpp
/** * \file SRC/Indexlist.cpp * \author Hans Joachim Ferreau * \version 1.3embedded * \date 2007-2008 * * Implementation of the Indexlist class designed to manage index lists of * constraints and bounds within a QProblem_SubjectTo. */ #include <Indexlist.hpp> /*************************************************...
TOOL
0.905753
6.003575
c2dbb6a5-62af-4698-a49c-209f6776d978
ishandutta2007/codeforces
ikatanic/normal/23/A.cpp
#include <cstdio> #include <algorithm> #include <string> #include <cstring> #include <set> using namespace std; set< string > S; char a[105]; int main( void ) { scanf( "%s", a ); int n = strlen( a ), ans = 0; for( int i = 0; i < n; ++i ) { string s = ""; for( int j = i; j < n; ++j ) { s.push_bac...
ALGO
0.999901
4.002306
71905849-a037-4163-902b-87e03c00331b
Mhamuda/Numerical_Methods_Lab-MATH2232
NewtonForwardInterpolation.cpp
#include <bits/stdc++.h> using namespace std; class NewtonForwardInterpolation { private: double x[100], y[100][100], term, result; int i, j, k; public: NewtonForwardInterpolation() { i = 0; k = 0; result = 0.0; } public: void addData(double a, double b) { ...
ALGO
0.999702
4.622364
7f73dc2d-e88c-45bd-a9db-cf84e2a8bdb3
Hassan-Irtaza/Projects-folder
Section L/Prime_Number.cpp
#include <iostream> using namespace std; void swap(int &Num1, int &Num2) { if (Num1 > Num2) { Num1 = Num1 + Num2; Num2 = Num1 - Num2; Num1 = Num1 - Num2; } } int main() { int Num1, Num2; cout << "Enter a number: "; cin >> Num1; cout << "Enter a number: "; cin >>...
ALGO
0.999831
4.403892
2e04ca99-ea49-4b5d-a8c6-bda39d56c0b5
dahai78/noip
第一章编程基础/ch04逻辑表达式与条件分支/16.cpp
#include <iostream> #include <iomanip> //#include <cmath> #include <algorithm> using namespace std; int main(int argc, char** argv) { int a,b,c; cin >> a >> b >> c; cout << ( ( a+b>c && a+c>b && b+c>a) ? "yes" : "no" ); return 0; } /**********************************************************************...
ALGO
0.9999
4.212951
fd0a7c6c-f33c-41e8-981b-bb2089c0d218
d3b5/Beecrowd-URI-solutions
cpp+c/Fuel_Spent.cpp
#include<bits/stdc++.h> using namespace std; int main() { double v,t,fuel; cin >> t >> v; fuel = (v*t)/12; cout << fixed << setprecision(3) << fuel <<endl; return 0; }
ALGO
0.998854
3.773504
9ae88b86-8103-4f20-ae9c-a289680f4dd6
makio93/competitive-othersites
LeetCode/Problems/DCC/2022/Jan/W4/D25/main0.cpp
#include <bits/stdc++.h> using namespace std; // 自力AC class Solution { public: bool validMountainArray(vector<int>& arr) { int n = arr.size(); if (!((n>=3)&&(arr[0]<arr[1])&&(arr[n-2]>arr[n-1]))) return false; bool fin = false; for (int i=1; i+1<n-1; ++i) { if (arr[i] =...
ALGO
0.999927
5.383223
b73f6e4d-bafd-4e51-b717-0dc372adba08
Gnadi4/Algorithm_Gnadi
algospot/fence.cpp
#include <iostream> using namespace std; int main(){ int N; cin>>N; for(int testCase = 0; testCase<N; testCase++){ int num = 0; cin>>num; int fence[20000]; for(int i=0; i<num; i++){ cin>>fence[i]; } int result = 0; for(int i=0; i<num; i+...
ALGO
0.999683
4.549245
e71f8602-c971-40b9-8d91-a297ccabf8cd
jsarthak/LeetCode
reverse_kgroup.cpp
// Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. // k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is. // You may not alter the va...
ALGO
0.999978
5.931231
7c34cc12-1900-49da-91a1-124006dd86c0
shaonlipal2468/DSA
codeforces/726/arithmatic_array.cpp
#include<bits/stdc++.h> using namespace std; int solve(int arr[],int n) { int sum=0; for(int i=0;i<n;i++) sum+=arr[i]; if(sum==n) return 0; else if(n+1-sum >=0) return 1; else { int x = n+1-sum; return abs(x)+1; } } int main() { int t; cin>>t; while(t--) ...
ALGO
0.999699
3.985001
ff5e4534-5478-4d7b-a738-68a6f53755c2
raincross7/code-similarity
codes/train_code/problem192/problem192_41.cpp
#include <iostream> #include <string> #include <vector> #include <set> #include <algorithm> #include <cctype> #include <cmath> #include <queue> #include <map> #include <numeric> #include <unordered_map> #include <iomanip> #include <functional> #include <bitset> #include <complex> #include <stack> #define rep(i, n) for...
ALGO
0.999981
4.125155
41c4d0b5-e58c-4921-af03-a073c74d8b9f
diaas14/leetcode-solutions
1876_Substrings_of_Size_Three_with_Distinct_Characters.cpp
/** * Question: * A string is good if there are no repeated characters. * Given a string s, return the number of good substrings of length three in s. * Note that if there are multiple occurrences of the same substring, * every occurrence should be counted. * A substring is a contiguous sequence of characters in...
ALGO
0.999896
5.898407
5fd10b62-3c83-4acf-b4c0-30b4dbabc6be
devangsaxena/DSA-Standard-Repo
Strings/39-Recursively print all sentences that can be formed from list of word lists.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define setbits(x) __builtin_popcountll(x) #define mod 1000000007 #define FIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define R 3 #define C 3 // A recursive function to print all possible senten...
ALGO
0.999655
4.022518
6e5960b2-604a-4f9b-aff5-bfe65b44406b
AdAstraSaturn/godot-custom
thirdparty/embree/kernels/bvh/bvh_builder_morton.cpp
#include "bvh.h" #include "bvh_statistics.h" #include "bvh_rotate.h" #include "../common/profile.h" #include "../../common/algorithms/parallel_prefix_sum.h" #include "../builders/primrefgen.h" #include "../builders/bvh_builder_morton.h" #include "../geometry/triangle.h" #include "../geometry/trianglev.h" #include ".....
ALGO
0.998617
5.042109
e37e0959-e863-4107-8af8-8494c07ad761
SudipTimalsina/CPP_LEC
OOP_Lab/Lab_1/Lab_1_without_class_member/Lab1_arg_with_noreturn.cpp
#include<iostream> #include<cmath> using namespace std; // fucntion with argument with return type void areaoftriangle(double x,double y,double z) { // Here x,y,z are length of the sides if the triangle // And s is the half of sum of all sides double s , Area ; s=((x+y+z)/2); Area=sqrt(s*(s-x)*(s...
ALGO
0.997195
4.387622
d41cd451-1691-4827-b08b-39edd366f45f
sukeshch/LC
2064-minimized-maximum-of-products-distributed-to-any-store/2064-minimized-maximum-of-products-distributed-to-any-store.cpp
class Solution { public: bool canProductsDist(vector<int>& q, int st, int mq) { int idx = 0; while(st > 0 && idx < q.size() ) { st -= ceil(1.0 * q[idx] / mq); if(st < 0) return false; idx++; } if(idx == q.size()) return true; return false; ...
ALGO
0.999992
5.944027
9ef0c1c8-4248-4239-9ec3-cd9e00810ac9
ashish-kmr/Dynamic_SSSP
boost_1_55_0/libs/multi_index/example/rearrange.cpp
#if !defined(NDEBUG) #define BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING #define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE #endif #include <boost/config.hpp> #include <boost/detail/iterator.hpp> #include <boost/multi_index_container.hpp> #include <boost/multi_index/random_access_index.hpp> #include <boost/random/binomial_dis...
TEST
0.982613
6.913163
ee8199b6-4e48-4f58-9c22-4d9e88988260
Abhinow-katore/DSA-Cracker
DSA/SORTING/sort_custom.cpp
#include <iostream> #include <stdio.h> #include <algorithm> using namespace std; struct point { int x; int y; }; bool myCom(point p1, point p2){ return (p1.x<p2.x); } bool myCom1(point p1, point p2){ return (p1.x<p2.x); } int main() { int n = 6; point arr[] = {{3,10},{2,8},{5,4}}; sort(arr...
ALGO
0.999844
4.406051
f5e110ca-d185-4dbf-82b7-f19c6ccf76f0
SaiTp/LeetCode-Codes
0135-candy/0135-candy.cpp
class Solution { public: int candy(vector<int>& ratings) { int n=ratings.size(); vector<int>v1(n,1),v2(n,1); for(int i=1;i<n;i++) if(ratings[i]>ratings[i-1]) v1[i]=v1[i-1]+1; for(int i=n-2;i>=0;i--) if(ratings[i]>ratings[i+1]) v...
ALGO
0.999996
6.067586
8471bbeb-fffc-4895-a8c9-289d82f8f6f0
chiranjeev-21/Codes-in-C-Cpp-and-python-of-CP-and-algorithms
codeforces/codeforces_round_826_a.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fr first #define sc second #define clr(a) memset(a, 0, sizeof(a)) #define sz(x) x.size() #define rep(n) for (ll i = 0; i < n; i++) #define repc(i, n) for (ll i = 0; i < n; i++) #define FOR(i, x, y) for (in...
ALGO
0.999973
4.212207
a38093f8-0ec3-47b3-b618-11cf177f1199
masoudbehzadinasab/Trilinos_12_11
packages/trilinoscouplings/src/epetraext/EpetraExt_AmesosBTF_CrsMatrix.cpp
#include <Epetra_Import.h> #include <Epetra_CrsMatrix.h> #include <Epetra_CrsGraph.h> #include <Epetra_Map.h> #include <Epetra_Comm.h> #include <trilinos_btf_decl.h> using std::vector; using std::cout; using std::endl; namespace EpetraExt { AmesosBTF_CrsMatrix:: ~AmesosBTF_CrsMatrix() { } AmesosBTF_CrsMatrix::NewT...
ALGO
0.916066
5.22009
34cfedcb-c63d-411d-bced-64fb82b6ed94
ishandutta2007/codeforces
gamegame/normal/888/E.cpp
#include<iostream> #include<cmath> #include<set> #include<queue> #include<algorithm> using namespace std; typedef long long ll; int n,k; ll m; ll a[35],b[262144],e[262144]; ll c[262144],d[262144]; vector<ll>s,t; int main(){ ios::sync_with_stdio(false); cin >> n >> m; k=n/2; for(int i=0; i<n ;i++){ cin >> a[i]; ...
ALGO
0.999991
3.874605
e6e25d08-bee4-465e-a1ef-96dce37cfd30
VauP/URI_Judge_SolutionsCPP
1930.cpp
#include <iostream> using namespace std; int main(){ int a,b,c,d,sum; cin >> a >> b >> c >> d; sum = (a + b + c + d) - 3; cout << sum << endl; }
ALGO
0.999504
4.007507
cf2f3f18-a8eb-416c-8526-2933fc0851f9
hj-yu-code/C-plusplus
10_stl2/stl_vector_sort_사용자정의.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; bool compare(int a, int b) { // return a < b ; // ASC return a > b ; // DESC } bool compare2(string a, string b) { // return a.size() < b.size(); // ASC return a.size() > b.size(); // DESC } int main() ...
ALGO
0.99924
4.495058
a81ec17b-ef5d-42f7-ac55-7f2c3339a024
muazharin/ow_mobile
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.998859
6.785645
31ae2d04-e38a-4386-91cf-a9b57619936d
dzuizz/codeforces
C_Prepend_and_Append.cpp
#include<iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; string s; cin >> s; int l=0, r=s.size()-1; while (l<r) { if (s[l] == s[r]) break; l++, r--; } cout << r-l+1 << '\n'; } }
ALGO
0.999808
4.804305
efae8e4b-5cf5-445a-9586-3c9e3ab3e56a
SetsunaChyan/OI_source_code
USST/VJ1/N.cpp
#include <cstdio> #include <memory.h> typedef long long ll; int n; ll f[60][4]; int main() { memset(f,0,sizeof(f)); f[0][3]=1; for(int i=1;i<55;i++) { f[i][3]=f[i-1][2]+f[i-1][3]; f[i][2]=f[i-1][1]; f[i][1]=f[i-1][0]; f[i][0]=f[i][3]; } while(~scanf("%d",&n)&&n) { n--; printf("%lld\n",f[n][0]+f[n][...
ALGO
0.999798
3.459104
33aa42ba-a83e-469a-9ba0-cc67c4977246
Vortexx2/DSA-questions
leetcode/easy/234-palindrome-ll/stack.cpp
/** * @file stack.cpp * @author Vortexx2 * @brief Problem 234 - Palindrome Linked List * @approach Using stacks * @date 03-07-2021 * * Runtime - 208 ms * Memory Usage - 123.4 MB */ #include <iostream> #include <stack> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0),...
ALGO
0.999705
6.512146
c9cc95d3-142d-4dca-84d4-812b32e928e5
rabarbra/webserv
srcs/Config.cpp
#include "../includes/Config.hpp" Config::Config() {} Config::~Config() {} Config::Config(const Config &other) { *this = other; } Config &Config::operator=(const Config &other) { if (this != &other) { this->servers = other.servers; } return *this; } // Getters char **Config::getEnv() const { return this->...
CONFIG
0.991765
4.364545
f2b6415c-97b2-4486-9751-388048e0fe8f
ishandutta2007/codeforces
irkstepanov/normal/703/C.cpp
#include <bits/stdc++.h> #include <string.h> #define all(a) (a).begin(), (a).end() #define sz(a) (int)(a).size() #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef long double ld; typedef pair<int, ll> data; const ld eps = 1e-9; bool eq(ld a, ld...
ALGO
0.999861
4.579779
08a6202d-afbc-4632-82ff-aae3dded3f18
baicie/fucking-algorithm
src/algorithm-cpp-backup/116.填充每个节点的下一个右侧节点指针.cpp
/* * @lc app=leetcode.cn id=116 lang=cpp * * [116] 填充每个节点的下一个右侧节点指针 */ // @lc code=start /* // Definition for a Node. class Node { public: int val; Node* left; Node* right; Node* next; Node() : val(0), left(NULL), right(NULL), next(NULL) {} Node(int _val) : val(_val), left(NULL), right(NU...
ALGO
0.999465
6.018066
4f77458d-b499-488b-9d18-e291735b0c66
ananyajana/Google_Code_Jam
src/bathroom_stalls_2017.cpp
/* Google Code Jam 2017, problem C: Bathroom Stalls Looks like divide and conquer mechanism ha to be applied. Probably gaps should be in sorted order, so that we don't need to process all gaps. Only the lasrgest gap(s) at any time are processed. Rest need not be processed. We do not need to process all the cells in a ...
ALGO
0.99872
3.680931
dc3b0bb3-8cdb-4149-a610-db2469905977
Kuromadoshi/repository
HackerRank/30-days-of-code/08-dictionaries/phonebook.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <map> #include <string> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ map <string, string> phoneBook; string name; string number; ...
ALGO
0.997617
4.424471
598a75b5-4095-4abb-b9b8-e3c29e6db96d
SiweiYang/CodingChallenge
GCJ2018/GoGopher/solution.cpp
// // Created by syang on 2017/4/22. // #include <algorithm> #include <iostream> #include <vector> using namespace std; bool is_filled(bool *board, int x, int y) { for (int i = x; i < x + 3; i++) { for (int j = y; j < y + 3; j++) { if (!board[i * 1000 + j]) { // printf("%d %d f...
ALGO
0.99725
3.6319
2719a82c-7e9c-4112-af81-7708730359ea
hjiang13/LLMs-in-IR
POJ-104/82/1600.cpp
#include <iostream> using namespace std; int main() { int n,i,a,b,x,y; y=0; x=0; i=1; cin >> "%d",&n); while(i<=n){ cin >> "%d%d",&a,&b); if(a>=90&&a<=140&&b>=60&&b<=90){ x=x+1; i=i+1; } else{ if(y<x){ y=x; x=0; i=i+1; } else{ x=0; i=i+1; } } } if(y<x){ y=x; cout << "%d",y); } else{ cout << "%d",y); } return 0; }
ALGO
0.999759
3.07903
83a8d1d9-eda4-4389-936f-a4567ff543bf
naruse/challenges
CrackingTheCodingInterview/Version4/TreesAndGraphs/7.TreeToVectorOfLists.cpp
/* Given a binary tree, design an algorithm which creates a linked list of all the nodes at each depth (e.g., if you have a tree with depth D,you'll have D linked lists). */ #include <iostream> #include <vector> #include <list> using namespace::std; vector<list<int> > lists; class Node { public: int data; ...
ALGO
0.999831
6.039292
9b2f908f-a3f9-4ffb-9c83-204bb6462f47
Kernel391/Tic_Tac_Toe_Game
SunBox/tic_tac_toe_game.cpp
#include "tic_tac_toe_game.h" tic_tac_toe_game::tic_tac_toe_game()//, { cage = new int* [3]; for (int i = 0; i < 3; i++) { cage[i] = new int[3]; } for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { cage[i][j] = Game::Empty_cage; } } count_free_field = 9; } tic_tac_toe_game::~tic_tac_toe...
ALGO
0.978514
3.646602
7973f118-c3aa-4c04-acc8-32719722cceb
EazyReal/CompetitveProgramming
before2024/20231007-fbr1/C.cpp
#include <bits/stdc++.h> #define LOCAL using namespace std; #define X first #define Y second #define pb push_back #define mp make_pair #define all(a) a.begin(), a.end() #define rep(i, st, n) for (int i = (st); i < (n); ++i) #define repinv(i, st, n) for (int i = ((n)-1); i >= (st); --i) #define MEM(a, b) memset(a, b, s...
ALGO
0.999864
4.132505
cc3508a1-438b-490b-b4e3-c112649822d2
OneBitPython/Codeforces
C_First_element_at_least_X.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(c) c.begin(), c.end() #define endl "\n" const double PI=3.141592653589; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(unsigned x) {cerr << x;} void __print(unsigned long x) {cerr << ...
ALGO
0.999852
4.940767
ef6c0695-e7c0-424c-84e1-d9592d3f3538
fe1w0/VulnInfoSearch
DataSet/MethodSet/VulnSet/C++/CWE-190/CVE-2017-6839/decodeSample.cpp
static int16_t decodeSample(ms_adpcm_state &state, uint8_t code, const int16_t *coefficient) { int linearSample = (state.sample1 * coefficient[0] + state.sample2 * coefficient[1]) >> 8; linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; linearSample = clamp(linearSample, MIN_INT16, MAX_INT16)...
ALGO
0.994858
5.423131
6b43a071-6adf-4922-9ef7-5f14c6aa68c1
zee-bit/Competitive-Programming-codes-CPP
Anti-Sudoku.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin>>t; while(t--) { vector<string> board(9); for(int i=0; i<9; i++) cin>>board[i]; int reg=0, k=0; for(int i=0; i<9; i++) { if(i%3==0) { reg=0; reg+=k++; } if(boa...
ALGO
0.999732
4.43754
a7004327-3169-40ac-9b1f-7cb4007b738e
Ahmedsabib/DS_Algo
segment_tree/segment_tree.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = (int)1e5 + 5; int a[maxn], tree[4 * maxn]; void build(int node, int start, int end) { if (start == end) { tree[node] = a[start]; return; } int mid = (start + end)/2; build(2 * node, start, mid); build(2 * node + 1, mid + 1, end); tre...
ALGO
0.99964
5.31423
7bf7bc1a-b592-4965-91fd-d192a853dc63
GeorgeSuarez/COMPSCI-2
LAB 4/P11.12/appointment.cpp
#include "appointment.h" #include <iostream> #include <string> #include <vector> using namespace std; string Appointment::get_desc() const { return description; } int Appointment::get_day() const { return day; } int Appointment::get_start_hr() const { return start_hr; } int Appointment::get_end_hr() const { return...
TOOL
0.951584
5.213772
1e35ca18-d092-4f16-87cb-ccef837f8361
DrEstaym/School-Algorithm
class12/Array/repairOddEven.cpp
#include<iostream> using namespace std; int main() { //Initiate Array int size = 25; //Tambahan: int size untuk mengatur jangkauan array-nya (biar enak dimodif) int nilai[size]; //Kebanyakan isi (50 -> 25) //Fill array for(int i = 0; i < size; i++) { nilai[i] = i + 1; } ...
ALGO
0.996483
4.524735
9657b916-683a-43e4-a7dc-e761ebccaf0a
MitI-7/CompetitiveProgramming
AtCoder/ABC/ABC368/G.cpp
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <memory> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <unordered_map> #include <unordered_set...
ALGO
0.999853
5.064373
4e7c856a-3efe-4e11-b2e0-681e3e7c9cd5
jeete121/Coding
Programs/Practice/Prac/GraphAlgorithms/designer_pdf.cpp
#include <bits/stdc++.h> using namespace std; int designerPdfViewer(vector<int> h, string word) { int m = word.size(); int c[m]; int k = 0; for (int j = 0; j < m; j++) { int x = 97; while (word[j] != x && x <= 122) { x++; } c[k] = h[x - 97]; ...
ALGO
0.999675
4.587976
1a8f679e-0e0a-441a-9dfe-d4846d49183c
mrssonya/rgr
main.cpp
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main() { double a, b, c, d, e, f; // axx + bxy + cyy + dx + ey + f = 0 cin >> a >> b >> c >> d >> e >> f; // чтобы все выводилось в нужном формате // (без e и с определенным количеством знаков после точки) cout.p...
ALGO
0.999669
4.488666
d295eb3a-9cd9-4a00-b2e4-52bc1384d4d8
Siriayanur/DSA
Arrays/39isPalindrome.cpp
#include <iostream> using namespace std; bool isPalindrome(int a) { int temp = a; int rem = 0, sum = 0; while (temp != 0) { rem = temp % 10; sum = sum * 10 + rem; temp /= 10; } if (sum == a) { return true; } else return false; } /*Complete th...
ALGO
0.999708
4.511147
c2fce1f5-4d83-4bf2-888f-bcb830d1fbfe
Logan-Shi/libs
eigen-eigen-b9cd8366d4e8/build_dir/doc/snippets/compile_MatrixBase_topLeftCorner_int_int.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main(int, char**) { cout.precision(3); Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.topLeftCorner(2, 2):" << endl; cout << m.topLeftCorner(2, 2) << endl; m.topLef...
ALGO
0.958682
3.694217
a1d1f4c9-9cc4-43a5-8925-27879304b711
cran/fpROC
src/trapezoid_rule.cpp
#include <RcppArmadillo.h> #ifdef _OPENMP #include <omp.h> #endif // [[Rcpp::plugins(openmp)]] // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::plugins(cpp11)]] using namespace arma; using namespace Rcpp; //' Calculate Area Under Curve (AUC) using trapezoidal rule //' //' @description Computes the area under a curve u...
ALGO
0.997834
6.988302
a745bd57-ea20-440a-b943-6d8a1cb81809
truong-ngt/cocos-hot-upodate
server/Do99/frameworks/cocos2d-x/cocos/2d/CCAutoPolygon.cpp
#include "2d/CCAutoPolygon.h" #include "poly2tri/poly2tri.h" #include "base/CCDirector.h" #include "renderer/CCTextureCache.h" #include "clipper/clipper.hpp" #include <algorithm> #include <math.h> USING_NS_CC; static unsigned short quadIndices9[]={ 0+4*0,1+4*0,2+4*0, 3+4*0,2+4*0,1+4*0, 0+4*1,1+4*1,2+4*1, 3+4*...
ALGO
0.996465
4.487389
ab4c3522-0e67-445e-b0f7-6ad2c1acae16
SingularDuo/C-COMPETITIVE-TRAINING
BT-CO-SUONG/2POINTER/NRSEQ.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define KING_PHAT signed main() #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl '\n' #define vec(type, a, size, value) vector<type> a(size, value); #define all(x) x.begin(), x.end() #define I_O(inpu...
ALGO
0.999039
4.788637
6dd3409e-5d72-41a6-b680-201967b6f4e6
Mouadh-Bourezg/BIBLIOMATE
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
d6e72f55-caf0-49cc-ab9b-c62756f672a0
superAman07/Cpp-basic-STL-to-advance-DSA
62. Max_element and min_element.cpp
// In vector // #include<iostream> // #include<algorithm> // using namespace std; // int main(){ // vector<int>v{2,13,52,1,600,8,9,20}; // auto it=max_element(v.begin(),v.end()); // cout<<"max element is:"<<*it<<"\n"; // it=min_element(v.begin(),v.end()); // cout<<"min element is:"<<*it<<"\n"; /...
ALGO
0.999237
4.613857
9e4cd271-8960-4c72-b605-606a205ff391
sarath14k/projects
CompetitiveProgramming/AlgoTemplatesCPP/2_slidingWindow.cpp
#include <iostream> #include <vector> #include <unordered_map> // For frequency counting void slidingWindowAlgorithm(const std::string& s, int k) { std::unordered_map<char, int> charCount; // To keep track of character counts int left = 0; // Initialize left pointer int maxLength = 0; // To store the maxim...
ALGO
0.999974
7.427683
4e79be57-cc15-4db7-8a79-287c66d807b9
dushmi/informatics
infoarena/regine.cpp
#include <cstdio> int n, nr; void solve() { int l = n - (2 * n + 1) / 3 + 1; int la = l, ca = 1; while (la <= n) { printf("%d %d\n", la, ca); la += 2; ++ca; } la = l + 1, ca = l + 1; while (la <= n) { printf("%d %d\n", la, ca); la += 2; ++ca; } } int main() { freopen("re...
ALGO
0.999969
3.272875
5b1a59d8-d951-4afa-9527-caadfb37faa4
axelu/leetcode
cpp/00000-00499/numberofdigitone.cpp
// 233. Number of Digit One // https://leetcode.com/problems/number-of-digit-one/ class Solution { public: int countDigitOne(int n) { if( n == 0 ) return 0; if( n < 10 ) return 1; string s = to_string(n); int s_sz = s.size(); long base = 1; ...
ALGO
0.999774
6.706589
8247c79a-c623-40d6-9cd3-f323d6589d94
IsaacMPereira/cppPersonal
avulsos/vetores/matrizTeste2.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; char m[a][b]; for(int i=0; i<a; i++){ for(int j=0; j<b; j++){ cin >> m[i][j]; } } for(int i=0; i<a; i++){ cout << endl; for(int j=0; j<b; j++){ cout << m[i][j]; } } cout << endl; return 0; }
ALGO
0.997181
3.175713
484ea589-cf10-41a9-985f-c09013e3892f
amandanalesso/pdw-projeto-final
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
86e2bc37-bed8-4e70-a882-55665a3d9aca
borglab/gtsam
gtsam/3rdparty/GeographicLib/src/GARS.cpp
#include <GeographicLib/GARS.hpp> #include <GeographicLib/Utility.hpp> namespace GeographicLib { using namespace std; const char* const GARS::digits_ = "0123456789"; const char* const GARS::letters_ = "ABCDEFGHJKLMNPQRSTUVWXYZ"; void GARS::Forward(real lat, real lon, int prec, std::string& gars) { if (a...
TOOL
0.981741
7.235066
fbb6e4c4-d2c2-425e-953c-f10ea0039a9d
Coppede-Santos/PPyD_trabajo_final
secuentialMain.cpp
#include <iostream> #include <vector> #include <string> #include <chrono> #include "secuential/quickSort.cpp" #include "utils/fileReader.cpp" #include "utils/checkSorted.cpp" #include "parallel/quicksort.cpp" using namespace std; // The code is compiled with: // mpic++ secuentialMain.cpp -o sMain -std=c++17 // Code ...
ALGO
0.998732
5.73645
1de8e4bf-e6c9-4ecd-8760-8881b44fa357
wateralxe/z3-4-8-15
z3-z3-4.8.15/src/sat/smt/array_axioms.cpp
#include "ast/ast_trail.h" #include "ast/ast_ll_pp.h" #include "sat/smt/array_solver.h" #include "sat/smt/euf_solver.h" namespace array { struct solver::reset_new : trail { solver& s; unsigned m_idx; reset_new(solver& s, unsigned idx) : s(s), m_idx(idx) {} void undo() override { ...
ALGO
0.972164
6.869446
63870e1b-fcff-40dd-a2be-6a33e3b265dd
Srikar4510/Leetcode
1915-check-if-one-string-swap-can-make-strings-equal/check-if-one-string-swap-can-make-strings-equal.cpp
class Solution { public: // //O(N),O(1) // bool areAlmostEqual(string s1, string s2) { // if(s1==s2) return true; // int s1FreqMap[26]={0}; // int s2FreqMap[26]={0}; // int numdiff =0; // for(int i=0;i<s1.size();i++){ // char s1char = s1[i]; // char s2ch...
ALGO
0.999979
6.179302
0d3929d8-051c-41a6-b55b-33a8851c2453
khanadilgithub/GFG_DSA
Sorting/MergeTwoSoetedArray.cpp
#include<iostream> #include<math.h> using namespace std; //Method1 is merge both array in temp array an sort using STL sort function //Method2 void SortedArrayMerge(int arr1[], int arr2[], int n1, int n2) { int i=0, j=0; while(i<n1 && j<n2) { if(arr1[i]<=arr2[j]) { cout<<arr1[...
ALGO
0.999973
4.610392
07e71cba-ad1b-41df-a9ed-ee7a14b021bc
Andron00e/infa_2ndsem_semenov
2lab/F.cpp
#include <iostream> using namespace std; int main() { int arr[10001]; int max=0; int length=0; for(int i=0; i<10001; i++) { cin>>arr[i]; if(arr[i]==0) { length=i; break; } if(arr[i] > max) max=arr[i]; } int N=0; for(int i=0; i<length; i++) { if(max==arr[i]) { N++...
ALGO
0.99961
3.509664
8db8f184-8fd0-4932-96ff-fe9f66826792
trevphil/cryptosym
belief_propagation/src/hash_reversal/factor.cpp
#include "hash_reversal/factor.hpp" #include <spdlog/spdlog.h> namespace hash_reversal { /***************************************** *********** FACTOR GRAPH NODE *********** *****************************************/ FactorGraphNode::~FactorGraphNode() {} void FactorGraphNode::updateMessage(size_t to, bool rv_va...
ALGO
0.869782
6.180595
727248e4-20c8-4bee-9fea-6ca7d19e9ac1
Shuv00/Lab
Spring 2023/DS LAB/stack/array_stack.cpp
#include<bits/stdc++.h> using namespace std; int top=-1,size=5, a[5]; void display(){ if(top==-1){ cout<<"stack empty"<<endl; return; } for(int i=0;i<=top;i++){ cout<<a[i]<<" "; } cout<<endl; } void insert(int data){ a[++top]=data; } void pop(){ top--; //display(); } int ma...
ALGO
0.998958
4.218349
fb9ca1ad-1f73-4259-994a-e344d3f1bc1d
manamnathtiwari/CPP
c++ basics ask senior/Y.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, q; cin >> n >> q; vector<long long> a(n + 1), prefix(n + 1, 0); // 1-based indexing for (int i = 1; i <= n; i++) { cin >> a[i]; prefix[i] = prefix[i - 1] + a[i]; } while (q--) { int l, r; ...
ALGO
0.999971
4.832219
0e805ed5-9826-446e-bb7e-3722f3e12acb
zrainpku/cppsource
ttt/smooth.cpp
#include "smooth.hpp" #include "frangi.hpp" #include "frame.hpp" #include <stdio.h> #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/ml/ml.hpp> #include <opencv2/objdetect/objdetect.hpp> #include <math.h> #include <strst...
ALGO
0.996195
3.505148
a617b889-3bd2-4297-a029-f46151e5557c
raincross7/code-similarity
codes/train_code/problem164/problem164_77.cpp
#include <stdio.h> int main(){ int K,A,B; int check; scanf("%d", &K); scanf("%d %d", &A ,&B); for(int i=A; i<=B; i++){ if (i%K == 0){ check++; } } if (check > 0){ printf("OK"); }else{printf("NG"); } return 0; }
ALGO
0.999773
3.913741
5c96edf6-c7f9-44dd-bc5d-6fba6fabc6ad
blockspacer/bootstrap-redux
ext/boost-1.70.0/libs/numeric/ublas/doc/samples/mapped_vector.cpp
#include <boost/numeric/ublas/vector_sparse.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; mapped_vector<double> v (3, 3); for (unsigned i = 0; i < v.size (); ++ i) v (i) = i; std::cout << v << std::endl; }
TOOL
0.890176
3.081418
0a81be57-ec21-44bf-8f11-e037228e0e01
Asevenx174/CP-source-code-
02_OJ_solution/Cf contest/800 div2/b.cpp
#include<bits/stdc++.h> #define pb push_back #define mp make_pair #define pf printf #define ff first #define ss second #define sef second.first #define ses second.second #define PI 3.14159265 /// tan inverse = atan(value)*(180/PI) #define ms(a,b) memset(a, b, sizeof(a)) #define lp(i,a,b)...
ALGO
0.999884
3.902657
bd410e54-e1d5-4135-801f-76bea7d979f1
fsjhhh/acm_title
cpp/XOJ/2023年省赛模拟赛1/E.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <deque> #include <iomanip> // std::fixed std::setprecision(x) 保留x位小数 #include <array> #include <bitse...
ALGO
0.999141
3.314952
60e0eba9-f687-4241-8aac-53fa2e6d9d02
GeorgePogrebnyak/otus-cpp-basics
Containers/list.cpp
#include <iostream> #include <list> #include <iterator> using namespace std; int main() { std::list<int> l = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //l.push_front(5); //l.push_front(0); //l.push_back(25); //l.push_back(30); //l.pop_front(); //l.pop_back(); for (int x : l) { if (x == 9) { cout << x; } el...
TOOL
0.93445
3.473129
d6053fd6-a9c1-4ec3-888c-1cd9e11f0b79
yusifaliyevpro/Competitive-Programming
LeetCode/Hard/2499. Minimum Total Cost to Make Arrays Unequal.cpp
// 2499. Minimum Total Cost to Make Arrays Unequal // https://leetcode.com/problems/minimum-total-cost-to-make-arrays-unequal/ #include <iostream> #include <vector> using namespace std; class Solution { public: long long minimumTotalCost(vector<int>& nums1, vector<int>& nums2) { } };
ALGO
0.999957
5.770174
eccc409b-3629-4106-9da1-77f25ea40537
bulinx/dv-loam-change
orb_slam2/Thirdparty/g2o/g2o/core/optimization_algorithm_with_hessian.cpp
#include "optimization_algorithm_with_hessian.h" #include "solver.h" #include "optimizable_graph.h" #include "sparse_optimizer.h" #include <iostream> using namespace std; namespace g2o { OptimizationAlgorithmWithHessian::OptimizationAlgorithmWithHessian(Solver* solver) : OptimizationAlgorithm(), _solver(s...
ALGO
0.994692
6.811634
ccfa7b0e-22b1-4cf8-b21f-3093f7a66204
1358snowywolf/Coding4
CowRouting2/src/CowRouting2.cpp
#include <bits/stdc++.h> using namespace std; set<int> visited; vector<int> parents; map<int, vector<tuple<int, int, int>>> graph; vector<long long> Dijkstra(int start){ priority_queue<tuple<int, int, int>> pq; vector<long long> distance (graph.size() + 1, INT_MAX); pq.push(make_tuple(0, start, -1)); distance[sta...
ALGO
0.999772
3.688937
2d40ffa4-9248-43b9-88ed-471a0169204b
roshanrk44/Leetcode_Solutions
2966-divide-array-into-arrays-with-max-difference/2966-divide-array-into-arrays-with-max-difference.cpp
class Solution { public: vector<vector<int>> divideArray(vector<int>& nums, int k) { vector<vector<int>> ans; sort(nums.begin(),nums.end()); vector<int> temp; int a=nums[0]; for(int i=0;i<nums.size();i++) { if(temp.size()==3) { ...
ALGO
0.999959
5.491316
5140bb34-3fda-49f9-98ee-ea1221ba1c89
mulder93/shooting
cocos2d/cocos/vr/CCVRDistortion.cpp
#include "vr/CCVRDistortion.h" #include <math.h> NS_CC_BEGIN Distortion::Distortion() { _coefficients[0] = 0.441f; _coefficients[1] = 0.156f; } void Distortion::setCoefficients(float *coefficients) { for (int i = 0; i < s_numberOfCoefficients; i++) { _coefficients[i] = coefficients[i]; } ...
TOOL
0.930932
5.838524
111142b3-f890-42bf-a797-db75f87e0893
Caramelo18/Project-Euler
Project Euler/Problem 7.cpp
#include <iostream> using namespace std; // ----- PROBLEM 7 ----- bool isPrime(int num) { for (int i = 2; i <= (int)sqrt(num); i++) { if (num % i == 0) { return false; } } return true; } int main() { int count = 0; int i = 2; while (count <= 10001) { if (isPrime(i)) { count++; cout << i <...
ALGO
0.999791
4.758288
cb6328c0-6235-4d9a-a0ab-8fe3aa79ee3b
TechSir3n/LeetCode
Algorithms/С++/Easy/MinimumAbsoluteDifferenceInBST.cpp
/* Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two different nodes in the tree. * Input: root = [4,2,6,1,3] * Output: 1 */ class Solution { public: int getMinimumDifference(TreeNode* root) { if (!root) return 0; int difference = INT_MAX;...
ALGO
0.999983
6.834871
4e261ca1-796f-4a1a-ba32-9aea75dac63a
PriyanshuKrishna/LeetCode-Submissions
2962-count-subarrays-where-max-element-appears-at-least-k-times/2962-count-subarrays-where-max-element-appears-at-least-k-times.cpp
class Solution { public: long long countSubarrays(vector<int>& nums, int k) { long long int maxi=*max_element(nums.begin(),nums.end()),ans=0; int left=0,right=0,count=0; while(right<nums.size()){ if(nums[right]==maxi) count++; while(count>=k){ ...
ALGO
0.999946
5.628827
278b6ba1-3622-48f0-a9e9-f69edb48bda5
BojanFaletic/sudoku
src/parser.cpp
#include "parser.hpp" sudoku_number str_to_num(std::string const &st) { if (st.size() != 1) throw std::runtime_error("Unable to decode number\n"); const char c_num = st[0]; if (c_num >= '1' && c_num <= '9') return c_num - '0'; if (c_num == 'x' || c_num == 'X') return 0; throw std::runtime_error...
ALGO
0.975851
5.349792
033e4369-26c9-4e83-8a6b-bf9da66765ff
xianghuade/Challenge_Programming_Contest_2nd_Edition
chapter_02/exercise/poj_3009.cpp
#include <iostream> #include <algorithm> using namespace std; const int MAX_N = 20; const int MAX = 1 << 30; //输入 int row, col; int data[MAX_N + 1][MAX_N + 1]; int sx, sy;//起点坐标 int gx, gy;//终点坐标 int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};//移动方向 int res; void dfs(int x, int y, int steps){ if(steps >= 10)//如果超过...
ALGO
0.999906
3.907389
6d0fb840-7bda-4038-b842-4e9ed920915c
WiseCow/algorithm
BOJ/007.cpp
#include<cstdio> #include<algorithm> using namespace std; double D[1 << 20]; int map[20][20]; int N; double sol(int idx, int state) { if (idx == N)return 1; double &ret = D[state]; if (ret != -1)return ret; ret = 0; for (int i = 0; i < N; i++) { if (state&(1 << i)) continue; ret = max(ret, sol(idx + 1, sta...
ALGO
0.99967
3.492563
44844b33-150e-4579-8729-fe76e7458a83
raghavsheoran/Playground
closest_point.cpp
// Author - Raghav Sheoran // CodeForces Handle - raghav.sheoran #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <nu...
ALGO
0.999889
4.260474
5a0cad8b-3ff8-4b6b-978f-665f514021b9
shashwatw/DSA
Linked List/GFG_detect-a-loop-in-LL.cpp
// https://practice.geeksforgeeks.org/problems/detect-loop-in-linked-list/1 //{ 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 ...
ALGO
0.999679
5.051847
cf11c1bb-09c1-4e97-9a52-85183bb58979
RazvanPascalau/ARITH
spoj_ARITH/main.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <deque> std::ostream& operator<<(std::ostream& os, const std::vector<int8_t>& vectorToPrint) { for (int i = 0; i < vectorToPrint.size(); ++i) { os << vectorToPrint[i]; } return os; } std::o...
ALGO
0.998463
5.64212
354e44ee-8a1c-4716-860e-8354856a9453
Prince-Choudhury/LeetCode-Daily-Challenge
2509-minimize-xor/2509-minimize-xor.cpp
class Solution { public: int minimizeXor(int num1, int num2) { int count = 0; for(int i = 0; i < 32; i++) { if(num2 & (1 << i)) // set bit count++; } int res = 0; for(int i = 31; count && i >= 0; i--) { if(num1 & (1 << i)) { // set bit...
ALGO
0.999751
5.777626
59a6dcd6-4a6a-48f3-857e-64500a0e3ccf
Yoonsin/CodingTest
황윤신/두 큐 합 같게 만들기.cpp
#include <string> #include <vector> #include <map> #include <queue> #include <iostream> using namespace std; //ñ 1. fp ep Ŀ°  ؾϳ (ť fp>ep ۼ ) //ñ 2. ñ 1 ߴµ ָ̿ int solution(vector<int> queue1, vector<int> queue2) { map<string, bool> table; int answer = -1; vector<int> round_q; int fp = 0; ...
ALGO
0.999981
4.454032
15be01c1-e51b-4e7a-8ab5-bc7c2d6f1dad
Leapense/problems
21980번: 비슷한 번호판/cpp/src/main.cpp
#include "main.h" #include <iostream> #include <vector> #include <array> #include <unordered_map> #include <cctype> using namespace std; struct PlateKey { array<int, 26> freq{}; int upperCount = 0; bool operator==(const PlateKey &other) const { return freq == other.freq && upperCount == other...
ALGO
0.999671
5.347788
406fd61f-252d-44bf-b2ac-88554e06d302
JuJams/CS-UY-2124
Notes/functions.cpp
/* Defining functions and using parameter passing */ #include <iostream> #include <vector> #include <string> using namespace std; void addOne(int someInt) { // pass by value ++someInt; // Same effect as: someInt += 1; } int addOneV2(int someInt) { // pass by value ++someInt; // Same effect as: someInt +...
TOOL
0.972484
5.807868
1f1a57fc-41b7-4eef-98d6-4ad36ed33f0f
rayontheon/TXGS
libs/qwt/qwt_data.cpp
#include "qwt_math.h" #include "qwt_data.h" //! Constructor QwtData::QwtData() { } //! Destructor QwtData::~QwtData() { } /*! Returns the bounding rectangle of the data. If there is no bounding rect, like for empty data the rectangle is invalid: QwtDoubleRect::isValid() == false \warning This is an slow imp...
TOOL
0.87033
7.396972
8983d5c4-a448-4d51-b109-049c0e347c0b
ashwanidey/DSA
BST/Search In BST.cpp
//approach 1 Iterative bool searchInBST(BinaryTreeNode<int> *root, int x) { while(root){ if(root->data == x) return true; else if(root->data > x) root = root->left; else root=root->right; } return false; } //Approach 2 Recursive bool searchInBST(BinaryTreeNode<int> *root, int x) { ...
ALGO
0.99999
4.441937
32a041a5-55ec-4f63-b52d-27ac20302c96
Im-dex/xray-162
code/utils/xrLC_Light/tcf.cpp
#include "stdafx.h" #include "tcf.h" #include "net_stream.h" void _TCF::barycentric(Fvector2& P, float& u, float& v, float& w) { Fvector2 kV02; kV02.sub(uv[0], uv[2]); Fvector2 kV12; kV12.sub(uv[1], uv[2]); Fvector2 kPV2; kPV2.sub(P, uv[2]); float fM00 = kV02.dot(kV02); float fM01 = kV0...
ALGO
0.891214
5.404762
a8aec0b2-759b-49c4-b719-7c14f281d656
IvanMalkS/codes_style_2
4/double_list.cpp
/* * Продолжение задания №4 двусвязный список * Дан двусвязный линейный список и указатель первый элемент этого * списка. Все элементы списка хранят различные между собой значения. Необходимо * вывести значения элементов списка, которые находятся между наименьшим и * наибольшим элементами списка, в том порядке, в ...
ALGO
0.99824
4.608612
30558f8e-eaf2-4465-bf41-e1b797ebbd3e
VladiHack/Cpp
C++/mesta.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; int a;int b;int c; bool found=false; string res="-1"; int sizer=0; void Recursion(int B,int C,string msg,int pos,bool arr[]) { if(found) { return; } if(pos==sizer) { res=msg; found=true; return; } ...
ALGO
0.999938
3.585809
9a629ae1-76d6-4f10-b0aa-6a7cf28ce99c
FlorianWery/catchyCFDEM
CFDEM/LIGGGHTS/lib/gpu/lal_colloid_ext.cpp
/*************************************************************************** colloid_ext.cpp ------------------- Trung Dac Nguyen (ORNL) Functions for LAMMPS access to colloid acceleration routines. __________________________...
TOOL
0.968707
6.458776