uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
a5daabec-7319-40c7-9e50-41433ff80931 | Krystiankr/Poczatki-z-C-plus-plus | 6. Maksimum 4 liczb.cpp | #include <iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
if(a>=b and a>=c and a>=d){
cout<<a;
}
else if(b>=a and b>=c and b>=d){
cout<<b;
}
else if(c>=a and c>=b and c>=d){
cout<<c;
}
else {
cout<<d;
}
}
| ALGO | 0.999566 | 3.731397 |
bf011338-ff32-417b-847c-9fd82799cb7b | SimonHanzal/liblsl_neuro | src/time_postprocessor.cpp | #include "time_postprocessor.h"
#include "api_config.h"
#include <cmath>
#include <limits>
#include <utility>
#pragma GCC diagnostic ignored "-Wdouble-promotion"
#ifdef __clang__
#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion"
#endif
// === implementation of the time_postprocessor class ===
using ... | ALGO | 0.942705 | 6.803275 |
d4261358-e9fb-4f34-98bc-0ef1ad9809ba | AnkurSheel/codingame_old | c++/src/FinalOutputs/Medium/Teads.cpp | #ifndef _INCLUDES_H
#define _INCLUDES_H
#include <stdio.h>
#include <chrono>
#include <iostream>
#include <memory>
#include <string>
#pragma GCC optimize("-O3")
#pragma GCC optimize("inline")
#pragma GCC optimize("omit-frame-pointer")
#pragma GCC optimize("unroll-loops")
#define DEBUGPRINT(format, ...) fprintf(stder... | ALGO | 0.996585 | 5.415951 |
697bc577-a5e0-4844-a620-92eed4817c89 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_3696_6.cpp | #include <bits/stdc++.h>
using namespace std;
int e, cap, n, q;
vector<int> pos[3];
const int MAXN = 200005;
int suff[MAXN][3];
int get(int a, int b) {
int x = lower_bound(pos[a].begin(), pos[a].end(), b) - pos[a].begin();
return suff[x][a] + max(0, pos[a][x] - b - cap);
}
int main() {
ios_base::sync_with_stdio(0... | ALGO | 0.999928 | 3.779112 |
5c8a2851-127b-4305-a2e3-d4384d8b48e8 | lewissbaker/llvm | llvm/lib/CodeGen/RegisterScavenging.cpp | #include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveRegUnits.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeG... | TOOL | 0.88145 | 6.841726 |
0eea6840-66cb-43e4-87af-6d1249223eab | sdavtaker/hmule | src/DownloadQueue.cpp | #include "DownloadQueue.h" // Interface declarations
#include <protocol/Protocols.h>
#include <protocol/kad/Constants.h>
#include <common/Macros.h>
#include <common/MenuIDs.h>
#include <common/Constants.h>
#include <wx/utils.h>
#include "Server.h" // Needed for CServer
#include "Packet.h" // Needed for CPacket
#in... | TOOL | 0.864617 | 5.022203 |
452a5087-b720-46de-879f-1965dfe48493 | MinaProtocol/snark-challenge | reference-04-curve-operations/libff/algebra/curves/alt_bn128/alt_bn128_pp.cpp | /** @file
*****************************************************************************
* @author This file is part of libff, developed by SCIPR Lab
* and contributors (see AUTHORS).
* @copyright MIT license (see LICENSE file)
***********************************************************************... | ALGO | 0.940904 | 6.273318 |
08a67d91-e3a2-4912-b484-cdb725b36b21 | nickparnenzini/Algorithms | deleteDuplicates.cpp | /* Solution O(n) time and O(1) extra space */
/* Delete duplicates from a given array */
#include <vector>
#include <iostream>
using namespace std;
void deleteDuplicates(vector<int>& arr) {
int write_index = 1;
for (int i = 1; i < arr.size(); i++) {
if (arr[write_index-1] != arr[i]) {
arr... | ALGO | 0.999902 | 6.218392 |
e65dd0f7-f45d-431a-90a5-701e31dd6bd4 | uniqss/leetcodecpp | bk/OtherAlgorithms/carl/fibonacci_2.cpp | int fibonacci(int first, int second, int n) {
if (n <= 0) return 0;
if (n < 3) return 1;
if (n == 3) return first + second;
return fibonacci(second, first + second, n - 1);
}
#include <iostream>
#include <chrono>
using namespace std;
using namespace chrono;
int fibonacci_2(int i) {
if (i <= 0) ret... | ALGO | 0.998531 | 5.244335 |
fb77336c-78b4-4228-be95-b4f416f1e616 | Kwon770/algo-cpp | sol from BOJ/b17626.cpp | // https://www.acmicpc.net/problem/17626
// NUMBER 17626, Foue Squares
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#define MAX 987654321
using namespace std;
int main()
{
int memo[50001];
memset(memo, 0, sizeof(memo));
memo[0] = 0;
memo[1] = 1;
vector<int> Squares;
for... | ALGO | 0.999893 | 4.359253 |
7a418f88-52ce-41bb-9c8a-d41cd9434976 | sicongyu/Unreal-Lightmass-SH-based-GI | Engine/Source/ThirdParty/openexr/OpenEXR-1.7.1/ilmbase-1.0.3/ImathTest/testRoots.cpp | #include <testRoots.h>
#include "ImathRoots.h"
#include "ImathFun.h"
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <assert.h>
using namespace std;
void
sort (int nx, double &x0, double &x1, double &x2)
{
if (nx == 2)
{
if (x0 > x1)
swap (x0, x1);
}
if (nx == 3)
{
if ... | TEST | 0.988572 | 4.704953 |
35500057-6631-4a55-9f5a-8cc7aa4ed902 | Johniel/contests | atcoder/abc202/D/main.cpp | // atcoder/abc202/D/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << ... | ALGO | 0.999763 | 4.395146 |
40b31b75-8410-4339-9ad7-934a8850578d | ishandutta2007/codeforces | laycurse/normal/1360/F.cpp | #pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
inline int my_getchar(){
static char buf[1048576];
static int s = 1048576;
static int e = 1048576;
if(s == e && e == 1048576){
e = fread(buf, 1, 1048576, stdin);
s = 0;
}
if(s == e){
return EOF;
}
return buf[s++];
}
... | ALGO | 0.999826 | 3.880907 |
31bd3e11-239b-4f02-b6e8-5ec950ef4d1a | HHHHao-s/algorithm | 1915.最美子字符串的数目.cpp | #include "s.h"
/*
* @lc app=leetcode.cn id=1915 lang=cpp
*
* [1915] 最美子字符串的数目
*/
// @lc code=start
class Solution {
public:
long long wonderfulSubstrings(string word) {
int n =word.size();
// vector<int> pre(n);
// pre[0] = 1<<(word[0]-'a');
int pre = 0;
vector<long lon... | ALGO | 0.999886 | 5.395463 |
31c409c8-1bc2-467a-9628-a24d6de5ee85 | ReyRyanoff/C-Codes | CF1743A.cpp | #include <bits/stdc++.h>
using namespace std;
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define space " "
#define vc vector
#define pb push_back
const double PI = 3.14159;
int main()
{
optimize();
int t;
cin >> t;
while (t--)
{
int n, i... | ALGO | 0.998666 | 3.712891 |
85dc2e84-b99c-4dda-9329-e1f075f23a16 | MatSciTools/HFCalc | boost_1_79_0/libs/numeric/ublas/doc/samples/matrix_vector_binary.cpp | #include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
int main () {
using namespace boost::numeric::ublas;
matrix<double> m (3, 3);
vector<double> v (3);
for (unsigned i = 0; i < (std::min) (m.size1 (), v.size ()); ++ i) {
for (unsigned j = 0; j < m.size2 (); ++ j)
... | ALGO | 0.999512 | 3.986627 |
e23c140a-0f83-4c03-a76a-860327a73971 | AmanParadkar/Striver_A2Z_DSA_sheet | BinarySearchOn1dimArray/searchInsert.cpp | /*Given a sorted array of distinct integers and a target value, return the index if the target is found. If not,
return the index where it would be if it were inserted in order.
You must write an algorithm with O(log n) runtime complexity.
*/
#include<iostream>
#include<vector>
using namespace std;
int searchInse... | ALGO | 0.999976 | 6.205269 |
a6433f3e-3cbb-4587-b9bb-36da83242bd3 | CreateGabi/C_Study | CProgramming/chap12_prob02.cpp | //#pragma warning (disable:4996)
//#include <stdio.h>
//#include <string.h>
//
//int main()
//{
// char word[50], line[100];
// int len;
//
// scanf("%s", word);
// printf("The length of %s is %d.\n", word, strlen(word));
//
// // ڿ
// strcpy(line, word);
// printf("%s\n", line);
//
// // ڿ
// scanf("%s", word);
// i... | TOOL | 0.999092 | 3.395685 |
b0d81576-bef3-4090-bf94-402f46f7959d | wi-seong-cheol/Algorithm | Backjoon/SJAlgorithm/220306~220312/1864.cpp | //
// 1864.cpp
// main
//
// Created by wi_seong on 2022/03/13.
//
#include <iostream>
#include <string>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
while(1) {
string s; cin >> s;
if(s[0] == '#') break;
int len = int(s.length());
int ans ... | ALGO | 0.998133 | 3.669469 |
c1050222-b616-407d-aae7-0bf4393b05fb | bjbjkidrock/LeetCode-1 | Algorithms/reorder-log-files.cpp | 937. Reorder Log Files
https://leetcode.com/problems/reorder-log-files/
You have an array of logs. Each log is a space delimited string of words.
For each log, the first word in each log is an alphanumeric identifier. Then, either:
Each word after the identifier will consist only of lowercase letters, or;
Each wor... | ALGO | 0.994431 | 6.021592 |
7622943f-0b76-492d-a567-2f485093c7bf | AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain | code-imitator/data/dataset_2017/dataset_2017_8_formatted_macrosremoved/jodik/8294486_5681755159789568_jodik.cpp | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <stdarg.h>
#include <string>
#include <tuple>
#include <vector>
// M_PI SI TREBA ODLOZIT... | ALGO | 0.998855 | 3.979651 |
76859dc4-cf65-454a-88d6-f796e574f253 | vss2sn/CARND_Term_2_Project_5_MPC_Project | src/Eigen-3.3/doc/examples/Tutorial_BlockOperations_vector.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace std;
int main()
{
Eigen::ArrayXf v(6);
v << 1, 2, 3, 4, 5, 6;
cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
v.segment(1,4) *= 2;
cout << "after 'v.segment(1,4) *= 2', v... | ALGO | 0.991054 | 3.081962 |
18ad959c-1adb-4bad-90df-5a15729aee58 | paulnewman1979/edocteel | 050/501/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <unordered_map>
#include "../../template/common/Input.hh"
#include "../../template/common/Output.hh"
using namespace std;
typedef BaseTreeNode<int> TreeNode;
class Solution {
public:
ve... | ALGO | 0.999989 | 5.379732 |
533c4fc9-97a5-4707-914d-09f654e70de1 | ttl2004/PTIT-CODE | CPP-Ptit/CPP0622.cpp | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define endl '\n'
#define fi first
#define se second
using namespace std;
/*
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
... | ALGO | 0.999178 | 4.099123 |
3f7e6116-2a59-496f-ba85-3499a61fbef0 | satishshinde2048/cpp | refrence.cpp | #include<iostream>
using namespace std;
void swap(int &a,int &b){
int temp=a;
a=b;
b=temp;
}
int main(){
int x=10,y=20;
swap(x,y);
cout<<"x:"<<x<<endl;
cout<<"y:"<<y<<endl;
} | ALGO | 0.984806 | 3.48729 |
e9750b89-668b-4b8f-8747-4e2114c5b784 | wrandy44/cpp_exercises | cpp_d17/ex03/testU/mainIntra.cpp | #include "Encryption.h"
#include "Cesar.h"
#include "OneTime.h"
#include <string>
#include <iostream>
int main(){
Cesar c;
OneTime o("DedeATraversLesBrumes");
OneTime t("TheCakeIsALie");
Encryption::encryptString(c, "Je clair Luc, ne pas ? Ze woudrai un kekos !");
Encryption::decryptString(c, "Mi i... | TOOL | 0.936025 | 3.239389 |
579b9799-d99f-4b14-a79c-16f0f74a64aa | aman02022003/Data-Structures-and-Algorithms | Copy-List-with-Random-Pointer.cpp | class Solution {
public:
Node* helper(Node* head, unordered_map<Node* , Node*>&mp ){
if(head==0) return 0;
Node* newHead=new Node(head->val);
mp[head]=newHead;
newHead->next=helper(head->next,mp);
if(head->random){
newHead->random=mp[head->random];
}
... | ALGO | 0.999194 | 5.450486 |
9abb5cf9-7fa5-4a30-8f42-7b7472319649 | OpenDigitalTwin-Dev/FENGSim | toolkit/Geometry/gmsh/contrib/Netgen/libsrc/meshing/secondorder.cpp | #include <mystdlib.h>
#include "meshing.hpp"
namespace netgen
{
void Refinement :: MakeSecondOrder (Mesh & mesh) const
{
const_cast<Refinement&> (*this).MakeSecondOrder(mesh);
}
void Refinement :: MakeSecondOrder (Mesh & mesh)
{
int nseg, nse, ne;
mesh.ComputeNVertices();
mesh.SetNP(mesh.G... | ALGO | 0.95368 | 5.489237 |
c5394d5e-e7e9-428a-87f5-60bdf5ddd50c | par9615/competitive-programming | COJ-1196.cpp | #include <stdio.h>
#include <cmath>
using namespace std;
int used[15], ans[15], n;
int prime[] = {2,3,5,7,11,13,17,19,23,29,31,37,41};
int isPrime(int num)
{
for(int i = 0; i < 13; i++)
if(num == prime[i])
return true;
return false;
}
void backtrack(int pos)
{
if(pos == n)
{
if(!isPrime(ans[n-1]+1))
... | ALGO | 0.999718 | 4.336803 |
a092941e-3a17-48c0-a4c8-2f1df7070314 | Le-ECE/Air-Wheel-Driver | opencv/sources/samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp | /**
* @function cornerSubPix_Demo.cpp
* @brief Demo code for refining corner locations
* @author OpenCV team
*/
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
using namespace cv;
using namespace std;
/// Global variables
Mat src, src_gray;
int maxCorners = 10;
int maxTrackbar ... | ALGO | 0.999331 | 7.026481 |
040669e5-1e11-4067-92dd-df63eea597f3 | gulmini/olinfo | ois/ois_slashes/file.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<int, int> pi;
typedef vector<bool> vb;
const string quack = "quack";
void debug_out() { cout << "\n"; }
ll n, m;
vi v;
char c;
vector<vb> g;
vector<vi> adj;
vb vis;
inline int calc(int i, int j) {
return i*m + i/... | ALGO | 0.999584 | 3.650567 |
38076e56-ded1-412d-b8f7-54cc35efeed3 | qnfm/leetcode | 209. Minimum Size Subarray Sum.cpp | // #include <unordered_set>
#include <vector>
using namespace std;
class Solution
{
public:
int minSubArrayLen(int target, vector<int> &nums)
{
int start = 0, end = 0, sum = 0;
int r = INT_MAX;
while (end < nums.size())
{
sum += nums[end];
while (sum >= ta... | ALGO | 0.999975 | 6.280365 |
7ae65d61-53ff-4a09-b64a-41181e2ba64f | dalip2734/OS_Lab | FCFS.cpp | //Process Synced, dynamic input, c++ easy to understand code
#include<iostream>
#include<stdlib.h>
using namespace std;
//class process with all the time values and functions
class Process{
int id, bt, at, ct, tat, wt;
public:
void input(Process*,int );
void calc(Process *,int);
void show(Process*,int); ... | ALGO | 0.99993 | 4.383109 |
8f1622ae-8c3b-428f-915b-890529e08700 | thevimlesh/LeetcodeDSA | DSA_C++/array/LongestCommonPrefix.cpp | #include <vector>
#include <string>
using namespace std;
class Solution {
public:
string longestCommonPrefix(vector<string>& strs) {
string ans;
int i = 0;
while (true) {
char curr_ch = 0;
for (auto& str : strs) {
if (i >= str.size() || (curr_ch != 0... | ALGO | 0.999817 | 5.802773 |
e8e77ad4-275e-4f67-8720-ecdf465f8e64 | shahJainam961/Problem-Solving | CSES/Graph/CountingRooms.cpp | #include<bits/stdc++.h>
#define int long long
using namespace std;
bool isValid(int i, int j, int m, int n){
return i>=0 and i<m and j>=0 and j<n;
}
void bfs(int i, int j, vector<vector<bool>> &vis, vector<vector<char>> &mat){
int m = mat.size(); int n = mat[0].size();
queue<vector<int>> q;
q.push({i, j});
vis... | ALGO | 0.999892 | 5.916688 |
c5e746f7-23bf-40f7-ae63-277eaf3cb1f8 | phanil/autojs | deps/icu/source/test/perf/unisetperf/draft/bitset.cpp | #include "unicode/utypes.h"
#include "unicont.h"
#include "cmemory.h" // for UPRV_LENGTHOF
/*
* Hash table for up to 1k 64-bit words, for 1 bit per BMP code point.
* Hashes 64-bit words and maps them to 16-bit integers which are
* assigned in order of new incoming words for subsequent storage
* in a contiguous arr... | TOOL | 0.970507 | 6.895473 |
347f2a0b-3160-4dea-98c0-3f7863087d02 | Eadn33/android_system_core | fastboot/fastboot.cpp | #define _LARGEFILE64_SOURCE
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#incl... | TOOL | 0.982373 | 6.641575 |
469b5dfc-74cc-4635-820c-4c9216fdcfa6 | conan1005/DSA-Questions | Udemy/16-bit-manipulation/3-clear-last-i-bits.cpp | /*******************************************************************
* CLEAR LAST i BITS
*******************************************************************/
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int clear_last_i_bits(int num, int i) {
// METHOD-1
// right shift i times,
// the... | ALGO | 0.997262 | 4.321488 |
373f7a67-da20-45e3-86ba-ae1b637823d7 | 03-prathamesh/c-Wiith-DSA | 2] Code Wiith Harry/1.cpp | #include<iostream>
using namespace std;
void fun1(){
cout<<"Func1"<<endl;
}
void fun2(){
cout<<"Before Fun1"<<endl;
fun1(); //recursion func2 calls fun1 ie function is calling other functiion
cout<<"After Fun1"<<endl;
}
int main()
{
cout<<"Before Fun2"<<endl;
fun2(); //function call for the fun2();
... | ALGO | 0.988477 | 4.200324 |
cf52dbd5-eae6-4e5f-b346-618adf72def9 | Sakenkz118/Cplusplus | Ch2.Pr.Ex.28 (8th edition).cpp | #include <iostream>
using namespace std;
int main ()
{
int no_students; // the number of students in the elementary school
double daily_calories; // the number of calories required for each student from the mixture
double calories_nuts; // the number of calories in each pound of nuts
double nuts, drie... | ALGO | 0.994098 | 3.617314 |
0964e695-0d29-4564-93fc-648fdee6ef1b | ZahraShahid/LeetCode | Random-PickOnes/check-if-all-1s-are-at-least-length-k-places-away.cpp | // Returns true if the 1's in an array are seperated by at least k number of zeros
// https://leetcode.com/problems/check-if-all-1s-are-at-least-length-k-places-away/
class Solution
{
public:
bool kLengthApart(vector<int> &nums, int k)
{
if (k == 0)
return true;
int prev = -1;
... | ALGO | 0.999545 | 6.010854 |
8792788c-0606-43e3-a4c5-ed2c71886bc1 | shyu61/program-competition | code/contest/abc385/a.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c; cin >> a >> b >> c;
if (a == b && b == c) cout << "Yes" << endl;
else if (a + b == c || b + c == a || c + a == b) cout << "Yes" << endl;
else cout << "No" << endl;
}
| ALGO | 0.999986 | 4.883348 |
03532c14-329a-489d-a57c-4a2f4d34e26b | khanhtc1202/cp | leetcode/neetcode/128.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int longestConsecutive(vector<int>& nums) {
unordered_set<int> hm;
for (auto& n: nums) {
hm.insert(n);
}
int ans = 0, cnt, cur;
for (auto& n: hm) {
if (hm.find(n-1) != hm.end())
... | ALGO | 0.999864 | 5.370707 |
5bf6e6a6-dabf-429e-9ec4-e0b6487c42ee | johny65/acm | Programming Challenges/3np1.cpp | #include <iostream>
using namespace std;
unsigned int series[1000000] = {0};
int sns;
unsigned int ns;
unsigned int serie(unsigned int n)
{
if (n<=1000000 && series[n-1] != 0) return series[n-1];
unsigned int p=n;
if (p%2==0){
p = p/2;
}
else {
p = 3*p +1;
}
ns=serie(p);
sns=1+ns;
//if (p<=1000000) seri... | ALGO | 0.999767 | 4.024997 |
d1a6d7c3-c895-4638-8f42-2fb34b9372aa | ishandutta2007/codeforces | peterr/normal/1307/E.cpp | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1E9 + 7;
const int MAXN = 5000;
int s[MAXN + 1];
int pre[MAXN + 1][MAXN + 1];
vector<int> cows[MAXN + 1];
int solve(int pos, int n, int best)
{
int hunger = 0;
int f = s[pos];
for (int i = 1; i <= pos; i++)
{
if (s[i] == f)
... | ALGO | 0.999978 | 3.881305 |
b1c4af3f-04ca-4eda-81f8-01a144c1433b | yylive/qt4.7.1 | src/3rdparty/des/des.cpp | /*
* Description of DES
* ------------------
*
* Unlike the description in FIPS 46, I'm going to use _sensible_ indices:
* bits in an n-bit word are numbered from 0 at the LSB to n-1 at the MSB.
* And S-boxes are indexed by six consecutive bits, not by the outer two
* followed by the middle four.
*
* The DES e... | ALGO | 0.999683 | 4.953504 |
ef434aae-2b30-4336-b26d-15c3a3a10b86 | Ayesha-Shafqat36/pfweek4lab | task6.cpp | #include <iostream>
using namespace std;
void payable(int total,string day);
void WPayable(int total,string day);
main()
{
int total;
string day;
cout << "Total Amount=";
cin >> total;
cout << "Enter Day:";
cin >> day;
if (day == "sunday")
{
payable(total,day);
}
if (day == "monday")
... | ALGO | 0.988027 | 3.528748 |
8c29c6c0-20be-4bfd-8acb-0e79d26dce08 | sinian666/code_41_12 | cpp_副本12/chapter_hashing/array_hash_map.cpp | /**
* File: array_hash_map.cpp
* Created Time: 2022-12-14
* Author: msk397 (<EMAIL>)
*/
#include "../utils/common.hpp"
/* 键值对 int->String */
struct Entry {
public:
int key;
string val;
Entry(int key, string val) {
this->key = key;
this->val = val;
}
};
/* 基于数组简易实现的哈希表 */
class A... | TOOL | 0.938794 | 5.642146 |
857e3188-5437-44b0-8c5b-1d8c1b8bedd6 | brpapa/algorithms | solutions/spoj/SCUBADIV.cpp | /*
dynamic programming > 0-1 knapsack
difficulty: easy
date: 29/Apr/2020
by: @brpapa
*/
#include <bits/stdc++.h>
using namespace std;
struct T {
int qtyOx, qtyNi, w;
T() {}
};
vector<T> A; int N;
int memo[1010][22][80];
int dp(int n, int ox, int ni) {
// cilindro atual A[n], demanda por uma qte o... | ALGO | 0.999824 | 4.537862 |
5f991c34-4c3b-4864-bb28-f46fa12f3c63 | Alpro-1B/Tugaspraktikum_IlhamSyihabudin | tugas 4/Tugas 2 P4.cpp | #include <iostream>
using namespace std;
int main(){
int n;
cout << "Masukkan tinggi segitiga: ";
cin >>n;
for (int i = 1; i <= n; i++){
for (int j = n; j > i; j--){
cout << " ";
}
for (int k = 1; k <= i; k++){
cout << "* ";
}
cout << endl... | ALGO | 0.996615 | 3.740671 |
62249044-70d1-4620-9736-5736187e964a | RoysamLab/Farsight-toolkit | Tracing/Preprocessing/SHtensor/3D/STmultRealFast.cpp |
#include "mex.h"
#include "matrix.h"
#include <math.h>
#include "SphericalTensor.cpp"
template <class T> inline void swap(T& x, T& y) { T t=x; x=y; y=t; }
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
if(nrhs != 3 && nrhs != 4) {
printf("\nUsage: Df = STderivative(f)\n\n",n... | ALGO | 0.995555 | 5.520617 |
82ce69e8-13a5-4d6e-8288-217aad04265c | itzuditsharma/GFG-Solved | Difficulty: Medium/Frog Jump/frog-jump.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int f(int ind, vector<int>& height, vector<int> &dp){
if(ind == 0) return 0;
if(dp[ind] != -1) return dp[ind];
int left = f(ind - 1, height, dp) + abs(hei... | ALGO | 0.994889 | 6.375166 |
4c047990-11f1-4963-979e-692f6d5c9af8 | SarbajitPbappy/DIU | phitron/B.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define c(x) cin>>x
#define cu(n) cout<<n<<endl;
#define ll long long int
const int M=1e5+5;
#define vl vector<ll>
#define pb push_back
using namespace std;
int main() {
int test;
c(test);
while (test--) {
int x;
c(x);
vl a;
for (in... | ALGO | 0.999428 | 4.004304 |
6a9e7d43-a045-4984-b1a9-53518ccb153f | lirui79/cn_workspace | project5/avltree.cpp | #include<iostream>
#include<cmath>
#include<algorithm>
#include<queue>
using namespace std;
template<class T>
struct Node {
T key;
Node<T>* lchild;
Node<T>* rchild;
Node<T>(T k) : key(k), lchild(nullptr), rchild(nullptr) {}
};
template<class T>
class AVLTree {
private:
Node<T>* root;
public:
AVLTree() :root(nul... | ALGO | 0.999976 | 4.330863 |
a5fd539e-c5ca-4ece-aecb-546f5096a5d6 | Sajal072004/Dsa-practice-for-interviews | Contests Practice/Codeforces/Codeforces974(div3)/first.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vl vector<long long>
#define vpii vector<pair<int,int>>
#define vvi vector<vector<int>>
#define vvl vector<vector<long long>>
#define pb push_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x.size())
#define vi... | ALGO | 0.99984 | 4.695443 |
cbfcb808-9eb0-4bb3-a352-c4eda3ddaf0d | asuhacoder/AtCoder | ABC/211/b.cpp | #include<iostream>
#include<algorithm>
using namespace std;
int main() {
string S[4];
for (int i = 0; i < 4; i++) {
string tmp; cin >> tmp;
S[i] = tmp;
}
int a = sizeof(S) / sizeof(S[0]);
sort(S, S + a);
string ans = "Yes";
if (S[0] != "2B") {
ans = "No";
}
i... | ALGO | 0.998963 | 3.410978 |
a95d624e-f5cf-4259-ab0c-0ae52ad4e0b0 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/MixtralExpert/top0-100/find-the-shortest-superstring-Solution.shortestSuperstring/177750_DoS_Exec_Code.cpp | begin_softmask(fz_context *ctx, pdf_run_processor *pr, softmask_save *save)
{
pdf_gstate *gstate = pr->gstate + pr->gtop;
pdf_xobject *softmask = gstate->softmask;
fz_rect mask_bbox;
fz_matrix tos_save[2], save_ctm;
fz_matrix mask_matrix;
fz_colorspace *mask_colorspace;
save->softmask = softmask;
if (softmask ... | TOOL | 0.995698 | 4.044076 |
5ca67c39-a692-4811-ba83-ac5dc567e709 | 2745518585/code | QOJ4914.cpp | #pragma GCC optimize("Ofast","inline")
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
inline char gc()
{
static char buf[100000],*p1=buf,*p2=buf;
return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
template<typename T> inline void read(T &... | ALGO | 0.999957 | 3.867441 |
6306bf9f-d0fa-4ecc-b66f-9407ba972208 | vichua2006/Competitive_Programming_Cpp | CSES/Dynamic Programming/RemovingDigits.cpp | //seems doable for my current skills
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int maxN = 1e6+1;
// dp[i] denotes the minimum steps needed for the integer i to reach 0
int N,dp[maxN];
int main(){
cin.tie(0);
cin.sync_with_stdio(0);
cin >> N;
memset(dp,0x3f,sizeof dp);
... | ALGO | 0.99984 | 4.145993 |
7f32e87c-df93-4b5c-aeab-11ff3a28827b | jayjaisswal/Data-Structure | DSA Using cpp/Array 1D/Array2/7OperationsONVector.cpp | #include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<int> v;
v.push_back(3);
v.push_back(5);
v.push_back(1);
v.push_back(6);
v.push_back(8);
v.push_back(9);
v.push_back(0);
v.push_back(11);
v.push_back(10);
for(int i = 0; i<v.size();i++)
{
... | ALGO | 0.999375 | 3.28219 |
a6c956bd-bd55-4a1d-aa45-d4609f7aee46 | 0x1d107/stft | unsupported/test/BVH.cpp | #include "main.h"
#include <Eigen/StdVector>
#include <Eigen/Geometry>
#include <unsupported/Eigen/BVH>
namespace Eigen {
template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); }
}
template<int Dim>
struct Ball
{
EIGEN_MAKE_ALIGN... | TEST | 0.994641 | 6.630454 |
7ae7b9bd-1640-4289-8635-d8059995418c | WangWei9705/Cplusplus | 每日一题/day7_2.cpp | /**********************************************************
* Author : WangWei
* Email : <EMAIL>
* Last modified : 2019-05-27 15:30:31
* Filename : day7_2.cpp
* Description : 判断括号序列
* *******************************************************/
#include <string>
#include <iostream>
#include <std... | ALGO | 0.99974 | 4.858105 |
22214658-ba08-42a5-a9ed-29a6d63c1093 | KiRE750/prog1 | Ch21/vector2.cpp | #include "../std_lib_facilities.h"
template <typename T1, typename T2>
void my_copy(vector<T1> v1, vector<T2>& v2)
{
for(auto val : v1)
{
v2.push_back((T2) val);
}
}
template<typename T>
T sum (vector<T> v)
{
T sum=0;
for(T val : v)
{
sum+=val;
}
return sum;
}
int mai... | ALGO | 0.999548 | 4.229878 |
575dd692-b631-4995-8fa9-e841010cf424 | Janhavibabber/DSA | Youtube lectures/Cllg wallah/1a. Array/squareArray.cpp | #include<iostream>
using namespace std;
void squareArr(int arr[], int n){
int res[n];
int i=0, j=n-1, k=n-1;
while(i<=j && k>=0){
if(abs(arr[i])<abs(arr[j])){
res[k--] = arr[j]*arr[j];
j--;
}
else{
res[k--]=arr[i]*arr[i];
i++;
... | ALGO | 0.99977 | 4.311608 |
89132b98-4365-45e6-b1c9-da43a67df2f2 | YeluriKetan/project-TREADS | Codeforces/D/1037 D. Valid BFS/Solution.cpp | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
string solve() {
int n, u, v, ai; cin >> n;
unordered_map<int, VI> tree;
for (int i = 0; i < n - 1; ++i) {
cin >> u >> v;
auto it = tree.emplace(u, VI());
it.first->second.push_back(v);
it = tree.emplace(v... | ALGO | 0.999992 | 4.66134 |
aa5f4787-dc70-41df-9009-4042e83d69c3 | NamanKrChoudhary/LeetCode | 0063-unique-paths-ii/0063-unique-paths-ii.cpp | class Solution {
public:
int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {
vector<int> arr(obstacleGrid[0].size(),0);
arr[0]=1;
for(int i=0; i < obstacleGrid.size(); i++)
{
vector<int> curr(obstacleGrid[0].size(),0);
for(int j=0; j<obstacleGrid... | ALGO | 0.999714 | 5.776313 |
38efd12d-6cab-4a6b-a1ef-17560977aa7f | AvanishShukla20/Leetcode-problems | 44-wildcard-matching/wildcard-matching.cpp | class Solution {
public:
bool isMatch(string s, string p) {
int n = s.size(), m = p.size();
vector<vector<bool>> dp(m+1, vector<bool> (n+1, false));
dp[0][0] = true;
for(int i = 1; i<= m; i++)
{
bool flag = true;
//the all remaining i's MUST be '*' f... | ALGO | 0.999931 | 5.499729 |
65ff5e6b-94c0-4509-ad71-e8a5abe2f02d | Sookmyung-Algos/2023algos | algos_assignment/최예헌_honi/week2/11046.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define MAX 10002
#define INF 987654321
int n, m;
int s, e;
int A[2000002];
int S[2000002];
void manachers(){
int r=0, p=0;
for (int i=0; i<n; i+... | ALGO | 0.999966 | 4.269804 |
e940af33-d5be-429d-828a-217fd49bf711 | LuvKobe/StudyCode-2023 | Code_04_25/时间复杂度11.cpp | #define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
//void calc(int n)
//{
// int sum = 0; //执行1次
// for(int i = 1; i <= n; ++i) //执行(判断)n+1次
// {
// sum = sum + i; //执行n次
// }
// cout << sum << endl; //执行1次
//}
//void calc2(int n)
//{
// int... | ALGO | 0.998257 | 3.849001 |
b9858d9d-6679-4ba5-b81a-afa5476b600a | KeithMcPherson/Tetris-AI | NeuralNet.cpp | #define NUM_INPUTS 10 * 20
#define NUM_OUTPUTS 4
#define NUM_HIDDEN_LAYERS 4
#define NEURONS_PER_LAYER 20
#define DBIAS -1
#define ACTIVATION_RESPONSE 1
#include "NeuralNet.h"
//*************************** methods for Neuron **********************
//
//-----------------------------------------------------------------... | ALGO | 0.994758 | 3.453361 |
670e2fd9-f089-431a-9505-dd382d5f42be | alifalhasan/CP-code-vault | Codeforces/Codeforces Round/Codeforces Round 614 (Div. 1)/B - Aroma's Search/70616420.cpp | #include<bits/stdc++.h>
using namespace std;
#define S scanf
#define P printf
#define G getline
#define SZ size()
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define ... | ALGO | 0.999917 | 3.682755 |
cb82aefc-2628-41b0-911d-fa37e27fe1d3 | chenBright/CodingInterviews | 53-正则表达式匹配/match_dfs.cpp | #include <string>
using namespace std;
class Solution {
public:
bool match(char* str, char* pattern) {
// 正则pattern到底末尾时,如果串str也到达末尾,则匹配成功
if (*pattern == '\0') {
return !(*str);
}
int strLength = strlen(str);
int patternLength = strlen(pattern);
if (pat... | ALGO | 0.999863 | 5.0167 |
2f7f92d5-d4cc-4bd6-99fd-91c5d8dffaf5 | ljm0223/Coms327 | Lee_Jongmin_assignment1.06/heap.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "heap.h"
struct heap_node {
heap_node_t *next;
heap_node_t *prev;
heap_node_t *parent;
heap_node_t *child;
void *datum;
uint32_t degree;
uint32_t mark;
};
#define swap(a, b) ({ \
typeof (a) _tmp = (a); \
(a) ... | ALGO | 0.999009 | 4.662464 |
18cff4fe-08c6-4a13-8bbf-c9de20b3308e | sreekarvjenr/competitive_programing_practice | CP/Practice/cses/intro/Bit_Strings.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
int n;
cin>>n;
int res = 1;
for (int i = 0; i < n ; i++)
{
res = (res * 2) % 1000000007;
}
cout<<res<<endl;
}
signed main()
{
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// int... | ALGO | 0.999968 | 4.511852 |
eb4c896f-4ee0-4ddc-b33c-48bade000db2 | CEMPD/SurrogateTools | SpatialAllocator/src/libs/ann_1.1.1/src/bd_search.cpp | #include "bd_tree.h" // bd-tree declarations
#include "kd_search.h" // kd-tree search declarations
//----------------------------------------------------------------------
// Approximate searching for bd-trees.
// See the file kd_search.cpp for general information on the
// approximate nearest neighbor searc... | ALGO | 0.999867 | 5.9355 |
3c6bbf2f-61a6-460c-87db-59634301781e | inshayaqoob/AI-Code-Summarize | transcoder/transcoder/data/evaluation/geeks_for_geeks_successful_test_scripts/cpp/CEILING_IN_A_SORTED_ARRAY_1.cpp | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <bits/stdc++.h>
using namespace std;
int f_gold ( int arr [ ], int low, int high, int x ) {
int mid;
if ( x <= arr [ low ] ) return low;
if ( x > arr [ high ] ) return - 1;
mid = ( low + hig... | ALGO | 0.999009 | 5.620733 |
1d07fffd-9653-42f1-8b69-d413dfe7d87f | geekynerdbiker/outsourcing | cpp-workspace/cpp-probs2/main.cpp | //
// main.cpp
// untitled2
//
// Created by Jacob An on 2021/12/09.
//
#include <iostream>
// Q7
const ComplexNumber z1(3.0, 4.0);
const ComplexNumber z2(2.0, -5.2);
const ComplexNumber z3(-1.5, 6.0);
const ComplexNumber z4(2.0, 3.0);
ComplexNumber z5 = subtract(multiply(add(z2, z3.conjugate()), z4), z1);
Comple... | TOOL | 0.955836 | 3.467218 |
c5df34bc-cc50-449d-9604-4b516c129cf5 | revyos-rocm/llvm-project-rocm | libc/src/string/memmove.cpp | #include "src/string/memmove.h"
#include "src/string/memory_utils/inline_memcpy.h"
#include "src/string/memory_utils/inline_memmove.h"
#include <stddef.h> // size_t
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(void *, memmove,
(void *dst, const void *src, size_t count)) {
// Memmove may handle s... | ALGO | 0.956379 | 7.840128 |
f6531f5b-fbe0-47f4-8685-6491e76d2b0f | manikanta2901/ubuntu | .history/codingChallenges/cpp/Codechef/longChallenges/Year2021/January/WatchingCpl_20210102142545.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.999999 | 3.952857 |
9130028f-45cb-4ef8-abec-27f9e506be22 | burperring/Programmers | 두 수의 나눗셈.cpp | #include <string>
#include <vector>
using namespace std;
int solution(int num1, int num2) {
int answer = 0;
answer = num1 * 1000 / num2;
return answer;
}
| ALGO | 0.99762 | 4.164322 |
d854da08-d90d-42e7-8aa5-a9999ad391cf | johnsusi/adventofcode | 2019/day15/main.cpp | #include <algorithm>
#include <deque>
#include <fstream>
#include <iostream>
#include <tuple>
#include <common/intcode.hpp>
#include <common/viz.hpp>
const auto north = std::pair{0, 1};
const auto west = std::pair{-1, 0};
const auto south = std::pair{0, -1};
const auto east = std::pair{1, 0};
auto to_dir(int value... | ALGO | 0.99915 | 6.514825 |
8b86ef6b-6f5f-4039-b6bc-d5ec95bdde6d | SURYAPRAKASHKALYANAM/LEETCODE-GFG-SOLVED-SOLUTIONS | 2070-most-beautiful-item-for-each-query/2070-most-beautiful-item-for-each-query.cpp | class Solution
{
public:
vector<int> maximumBeauty(vector<vector < int>> &items, vector< int > &queries)
{
sort(items.begin(), items.end());
unordered_map<int, int> m;
int maxi = 0;
for (auto i: items)
{
maxi = max(maxi, i[1... | ALGO | 0.999917 | 5.651819 |
e2dba654-ca6c-4542-ba26-3246057ca667 | LuxRender/LuxRays | src/slg/kernels/materialdefs_funcs_roughmatte_translucent_kernel.cpp | #include <string>
namespace slg { namespace ocl {
std::string KernelSource_materialdefs_funcs_roughmatte_translucent =
"#line 2 \"materialdefs_funcs_roughmatte_translucent.cl\"\n"
"\n"
"\n"
"\n"
"//------------------------------------------------------------------------------\n"
"// MatteTranslucent material\n"
"//---... | ALGO | 0.856195 | 6.686099 |
13d73a66-8c88-44d3-8e13-2f26c240f575 | koulritanshu/Learning_CPP | Inclusion exclusion principle/euclid_gcd.cpp | #include <iostream>
#include <climits>
using namespace std;
int gcd(int n1,int n2){
int lo_nu = min(n1,n2);
int gr_nu = max(n1,n2);
while((gr_nu%lo_nu)!=0){
int temp = gr_nu%lo_nu;
gr_nu = lo_nu;
lo_nu = temp;
}
return lo_nu;
}
int main()
{
int n1,n2; cin >> n1 >> n2;
... | ALGO | 0.999776 | 4.309383 |
a004c264-b2a8-4e09-87dc-3f363be936aa | Pavgkel/MPI_p | str2/Source.cpp | #include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <vector>
#include <iostream>
using namespace std;
#define N 512
int S1[N / 2][N / 2];
int S2[N / 2][N / 2];
int S3[N / 2][N / 2];
int S4[N / 2][N / 2];
int S5[N / 2][N / 2];
int S6[N / 2][N / 2];
int S7[N / 2][N / 2];
vector<vector<int>> add(vector<v... | ALGO | 0.99945 | 3.363605 |
e9f7011d-02d3-4686-8bfd-49f41a7cc335 | ishtiaquemahmud/folder | c++/equal_strings.cpp | #include<bits/stdc++.h>
using namespace std;
#include<string>
int main()
{
string a;
string b;
cin>>a>>b;
for(int i=0;i<a.size();i++)
{
if(a[i]<92)
{
a[i]+=32;
}
if(b[i]<92)
{
b[i]+=32;
}
}
if(a<b)
{
cout<<-1... | ALGO | 0.999992 | 3.703459 |
296c3d6f-52c4-48c2-aeaf-d7ba580d59d3 | AdityaShekharTiwary/codechef | second_max.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int arr[3];
//cin>>n;
for(int i=0;i<3;i++)
{
cin>>arr[i];
}
sort(arr,arr+3);
cout<<arr[1]<<endl;
}
return 0;
}
| ALGO | 0.999915 | 3.955159 |
f3875065-b987-41cf-819c-5a05d0687def | MADPToolbox/MADP | src/utils/calculateQheuristic.cpp | #include <iostream>
#include <float.h>
#include "MADPParser.h"
#include "TransitionObservationIndependentMADPDiscrete.h"
#include "QFunctionJAOHInterface.h"
#include "NullPlanner.h"
#include "Timing.h"
#include "directories.h"
#include "qheur.h"
#include "argumentHandlers.h"
#include "argumentUtils.h"
#include <sys/tim... | ALGO | 0.999163 | 4.76298 |
53e42e1d-d848-4ff9-a1d9-593f68c1eaf1 | hakim733/Vestas | myenv/lib/python3.10/site-packages/sklearn/svm/src/liblinear/tron.cpp | #include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "tron.h"
#ifndef min
template <class T> static inline T min(T x,T y) { return (x<y)?x:y; }
#endif
#ifndef max
template <class T> static inline T max(T x,T y) { return (x>y)?x:y; }
#endif
static void default_print(const char *buf)
{... | ALGO | 0.99962 | 5.847107 |
e92cdd66-dd92-4d69-b358-4c0e3e492942 | shivang-saxena/IB | DataStructure/Math & Array/Next_Permutation.cpp | /*
Next Permutation
Implement the next permutation, which rearranges numbers into the numerically next greater permutation of numbers for a given array A of size N. If such arrangement is not possible, it must be rearranged as the lowest possible order i.e., sorted in an ascending order. Note:
1. The replacement must b... | ALGO | 0.999974 | 4.946398 |
ccde56f7-b1ea-4a15-a68c-7276504b3856 | gusmendez99/parallel-project-2 | bruteforcev2.cpp | /*
============================================================================
Author(s) : G. Barlas, Gus Mendez, Roberto Figueroa, Michele Benvenuto
Compile : mpic++ -fpermissive -o bruteforcev2 bruteforcev2.cpp
============================================================================
*/
#include <s... | ALGO | 0.999932 | 3.016912 |
b9c8f888-f1f5-42d3-bbe9-81ca5c99b321 | rockyappdev/goMMD | goMMD/goMMD/Src_Bullet_287/BulletCollision/CollisionShapes/btMultiSphereShape.cpp | #if defined (_WIN32) || defined (__i386__)
#define BT_USE_SSE_IN_API
#endif
#include "btMultiSphereShape.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
#include "LinearMath/btQuaternion.h"
#include "LinearMath/btSerializer.h"
btMultiSphereShape::btMultiSphereShape (const btVector3* positions,const ... | TOOL | 0.868569 | 6.986727 |
43b3955d-5ff5-4c97-a1f9-2f549bdb1b2a | rahul17081998/Data-Structure | code_cpp/self pased DSA/String/LEETCODE/4-Count-Collisions-on-a-Road.cpp | /*Problem Statement:
There are n cars on an infinitely long road. The cars are numbered from 0 to n - 1 from left to right
and each car is present at a unique point.
You are given a 0-indexed string directions of length n. directions[i] can be either 'L', 'R', or 'S' denoting
whether the ith car is moving towards th... | ALGO | 0.999891 | 5.072479 |
599f20b2-e0f1-406e-b19a-2b727b269bdb | Sadiya194112/Toph | Count the Digits.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int tc; cin>>tc;
int c=1;
while(tc--){
int m,a,b;
double res=0;
cout<<"\n";
cin>>m;
for(int i=1; i<=m; i++){
cin>>a>>b;
res += b*log2(a);
}
cout<<"Case "<<c++<<": "<<ce... | ALGO | 0.997055 | 3.72345 |
8dba42f1-4118-4295-a745-e53d376640e3 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_145_0.cpp | #include <bits/stdc++.h>
using namespace std;
inline void SetIO(string Name) {
string Input = Name + ".in", Output = Name + ".out";
freopen(Input.c_str(), "r", stdin), freopen(Output.c_str(), "w", stdout);
}
const int N = 100010, M = 200010;
int First[N], To[M], Use[M], Next[M], Tot;
int n, m;
inline void Insert(in... | ALGO | 0.999974 | 3.631965 |
3c1a3cda-0e0c-4093-8418-b0ab14dca2b4 | essamsleiman/cs205_hw5 | code/p2/main2.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cassert>
#include <chrono>
using namespace std;
vector<vector<double>>* matrices[3];
vector<double>* bias;
// Store your resultant predictions here
vector<vector<double>>* resMatrix;
vector<double> parseLine(const... | DATA | 0.927212 | 6.699764 |
f645c5da-7c91-493d-8544-73ba059da347 | aap1998/shinchan | 19.cpp | #include<iostream>
#include<stdlib.h>
#include<omp.h>
using namespace std;
int binary_parallel(int *a, int low, int high, int key)
{
int mid;
mid = (low + high) / 2;
int low1, low2, high1, high2, mid1, mid2, found = 0, loc = -1;
#pragma omp parallel sections
{
#pragma omp section
{
low1 = low;
high1 = mi... | ALGO | 0.999937 | 5.166731 |
e9406095-85f4-443e-82de-6a30a06b59c6 | SamAinsworth/gem5-triangel | src/systemc/tests/systemc/misc/sim_tests/biquad/biquad3/delay_line.cpp | /*****************************************************************************
delay_line.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/*************************************************************************... | ALGO | 0.992904 | 5.923184 |
31c3c59d-844e-4710-b7d3-d915b35fd7ee | xiaopa18/DForest_Constrast_methods | M-index/lsb/lsb.cpp | #include "LSB.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lsbEntry.h"
#include "lsbTree.h"
#include "../blockfile/cache.h"
#include "../blockfile/f_def.h"
#include "../gadget/gadget.h"
#include "../rand/rand.h"
LSB::LSB()
{
t = -1;
d = -1;
n = -1;
m = -1;
L = -1;
B =... | ALGO | 0.998436 | 4.468283 |
80b6d9e1-4281-4aa1-b28a-edd481bda9a5 | hellojarvish61/backchodiiiiiiiii | Striver/revision/1.cpp |
// Find the Largest element in an array
#include<iostream>
using namespace std;
int largestElement(int arr[],int n){
int max = arr[0];
for(int i = 0;i<n;i++){
if(max < arr[i]){
max = arr[i];
}
}
return max;
}
int main (){
int arr[] = {2,5,4,8,1};
int n = 5;
int... | ALGO | 0.999951 | 4.331793 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.