uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
f1a5917d-fb6b-4fbd-9428-19964053f29f | wangxinghu/leetcode_co | leetcode_chenhao/algorithms/gasStation/gasStation.cpp | // Source : https://oj.leetcode.com/problems/gas-station/
// Author : Hao Chen
// Date : 2014-10-11
/**********************************************************************************
*
* There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
*
* You have a car with an un... | ALGO | 0.999996 | 5.592022 |
db6c091a-f5f2-4941-a3e4-8aab1666e9bc | st128222/programming-c-2025-spring | 2025-03-21-homework2/Project1/Source.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include"Matrix.h"
int main(int argc, char* argv[])
{
Matrix matr(3);
for (int i = 0; i < matr.getR(); ++i)
{
for (int j = 0; j < matr.getC(); ++j)
{
matr.set(i, j, 3 * i + j);
}
}
matr.print(std::cout);
std::cout << matr.det() << "\n";
matr.transpose(... | ALGO | 0.995942 | 3.71538 |
db0f8417-e954-45ed-b209-f6a7073b8892 | Bankairim/geometric-modeling | myproj/myVertex.cpp | #include "myVertex.h"
#include "myvector3d.h"
#include "myHalfedge.h"
#include "myFace.h"
#include <iostream>
myVertex::myVertex(void)
{
point = NULL;
originof = NULL;
normal = new myVector3D(1.0,1.0,1.0);
}
myVertex::myVertex(myPoint3D* pt) {
if (pt) {
point = new myPoint3D(*pt); // Copie profond... | TOOL | 0.996374 | 3.596191 |
bcf2b0c6-4270-4018-af55-89884d60821c | yfliu017258/CPP_programs | CodeForce/Problems/1552B.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a, b) for(int i = a; i < b; i++)
const int MAX_N = 5e4 + 5;
int t;
int n;
int r[MAX_N][5];
bool check(int *a, int *b){
int cnt = 0;
rep(i, 0, 5){
if(a[i] < b[i]){
cnt++;
}else{
cnt--;
... | ALGO | 0.999121 | 3.90713 |
4697ff6d-9f04-44d6-8478-f292fdb8372b | iwxyi/CryptoppDemo | tools/cryptopp/include/md5.cpp | // md5.cpp - modified by Wei Dai from Colin Plumb's public domain md5.c
// any modifications are placed in the public domain
#include "pch.h"
#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
#include "md5.h"
#include "misc.h"
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Weak1)
#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_... | ALGO | 0.995599 | 6.627733 |
69ddec5c-dc79-437e-9fc1-9f07d44c43e5 | exopeng/Competitive-Programming | cf/725/G.cpp | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template <class T> using Tree = tree<T, null_type, less<T>,
rb_tree_tag, tree_order_statistics_node_update>;
#define mp make_pair
#define pb push_back
#define lb lowe... | ALGO | 0.999915 | 3.408296 |
5763f6f5-d746-40d4-b547-580668352806 | TSATOA/Sogang | 알고리즘설계와분석/s191583_H02.cpp |
#include "Graph_adj_array.h"
void Read_Graph_adj_array (int Vnum, vertex V[], int Enum, edge E[]) {
// read graph information
// V와 E의 name field는 각각 자신의 인덱스를 저장한다
// V[].flag과 E[].flag은 반드시 false로 설정해야 한다.
int i;
int a, b, c;
for (i = 0; i < Vnum; i++) {
V[i].name = i;
V[i].flag = false;
V[i].f_hd = NONE... | ALGO | 0.999702 | 4.408643 |
2d837d90-980c-4532-b663-2ac7a61984b0 | Ayush73nigam/codore | decimal_to_binary.cpp | #include<iostream.h>
using namespace std;
int main(){
int number;
cin>>number;
long int result=0;
int power=1;
int r;
while(number>0){
r=number%2;
result=result+ r*power;
power=power*10;
number=number/2;
}
cout<<"the binary form of the given number is "<<r... | ALGO | 0.999959 | 4.595677 |
e8fcb540-2706-40b4-8734-037d497e590c | Nanored4498/CodeJam | 2019/2019_qualification/cryptograms_bis.cpp | #include <iostream>
#include <vector>
#include <set>
#include <map>
using namespace std;
#define LL long long
#define VL vector<LL>
int main() {
cout.tie(nullptr);
ios::sync_with_stdio(false);
int T;
cin >> T;
for(int x = 1; x <= T; x++) {
int N, L;
cin >> N >> L;
VL cipher;
LL c;
for(int l = 0; l < ... | ALGO | 0.999949 | 4.036943 |
4d471758-b7dc-440f-a75b-8f0432effac3 | SuperMiro0809/Introduction-to-programming-FMI-All-Problems | Sem. 10/Pract.11/Task12.cpp | #include <iostream>
using namespace std;
const char TERMINATE_SYMBOL = '\0';
const int MAX_SIZE = 100;
const int WORDS = 3;
void enterWords(char words[][MAX_SIZE]) {
for (int i = 0; i < WORDS; i++) {
cin.getline(words[i], MAX_SIZE);
}
}
void fillPrefixes(const char* start, const char* end, char allPr... | ALGO | 0.999888 | 4.897853 |
6c9761cd-168a-47d7-9c6f-23d86b08014b | imraghavagr/DSA-cpp | TRIE/02.implementTrie2.cpp | struct Node{
Node* links[26];
int endsWith = 0;
int countPrefix = 0;
bool containsKey(char ch){
return (links[ch-'a'] != NULL);
}
void put(char ch, Node* node){
links[ch-'a'] = node;
}
Node* get(char ch){
return links[ch-'a'];
}
void increaseCountPrefix(){... | ALGO | 0.999901 | 4.878043 |
fda4d0bc-392e-4e20-a238-c9cd84756b4e | md-06/C-Language-problem- | invest maturity.cpp | //invest maturity
#include<stdio.h>
int main()
{
int age,im,time;
float si;
printf("enter invest amount :");
scanf("%d",& im);
if(im<=10000||im>=100000)
{
printf("not eligiable ");
return 0;
}
else
{
printf("enter age:");
scanf("%d",&age);
if(age<=18||age>=55)
{... | ALGO | 0.973694 | 3.6448 |
eb73f42b-3ac2-4b87-8de9-ea27ad5b8812 | shuvonafis66/Master-at-Whole-Cpp- | 14.VECTOR/Erase Last 3 elements.cpp | //Erase Last three Elements from Vector
#include<iostream>
#include <vector>
using namespace std;
int main()
{
int ele,n;
vector<int>vector1;
cout<<"Enter the number of elements of the vector: ";
cin>>n;
for(int i=0;i<n;i++)
{
cout<<"Enter the element No "<<i+1<<" :";
cin>>e... | ALGO | 0.997324 | 3.784736 |
337013d5-ee3f-4870-b26c-7d2bda4046b6 | OneBitPython/Codeforces | B_Luxurious_Houses.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.999903 | 3.361181 |
1b7fe6a2-1632-43bc-887e-b6a095363e77 | rohit3716/Striver-SDE-Sheet | 0138-copy-list-with-random-pointer/0138-copy-list-with-random-pointer.cpp | /*
// Definition for a Node.
class Node {
public:
int val;
Node* next;
Node* random;
Node(int _val) {
val = _val;
next = NULL;
random = NULL;
}
};
*/
class Solution {
public:
Node* copyRandomList(Node* head) {
//Step 1: make copy of all nodes and insert in b... | ALGO | 0.999304 | 5.499604 |
3c04b6ff-c318-4c9f-b337-c81d15fa722a | philippkraft/cmf | cmf/cmf_core_src/upslope/connections/infiltration.cpp | /************************************************************************/
/* Infiltration */
/************************************************************************/
real cmf::upslope::connections::MatrixInfiltration::calc_q( cmf::math::Time t )
{
cmf::upslop... | ALGO | 0.998384 | 3.855927 |
08eab786-4193-472e-9f2a-bf7208069bd4 | JoElH4Ck3r/sea3d | SEA3D 1.6.0.2/Away3D_Physics/alchemy/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp | #include "btOverlappingPairCache.h"
#include "btDispatcher.h"
#include "btCollisionAlgorithm.h"
#include "LinearMath/btAabbUtil2.h"
#include <stdio.h>
int gOverlappingPairs = 0;
int gRemovePairs =0;
int gAddedPairs =0;
int gFindPairs =0;
btHashedOverlappingPairCache::btHashedOverlappingPairCache():
m_overlapFilte... | TOOL | 0.925915 | 5.282104 |
465bfe1e-fe85-4e95-b5bd-edb31e681dda | wabiverse/UnrealEngineOldArchived | Engine/Source/Programs/UnrealLightmass/Private/LightmassCore/Math/SFMT.cpp | /*=============================================================================
SFMT.cpp: Modified version of 'SIMD-oriented Fast Mersenne Twister (SFMT)' version 1.3.3 to work for Lightmass.
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html#dSFMT
Most modifications were to eliminate global storage (... | ALGO | 0.99936 | 6.390924 |
e63e994b-71d4-4b41-add2-a8995771fd18 | rajdeepdatta2016/Data-Structure-and-Algorithm | DSA/Linked List/EvenAfterOddLL.cpp | #include<bits/stdc++.h>
using namespace std;
#include "Node.cpp"
Node *evenAfterOdd(Node *head)
{
Node* newHead = NULL;
Node* tail = NULL;
Node* temp = head;
while(temp != NULL) {
if(temp->data%2 == 1) {
Node* newNode = new Node(temp->data);
if(newHead == NULL) newHead = newNode;
else tail->next = newNo... | ALGO | 0.999876 | 4.80246 |
cb740874-4d9f-4f2d-a7f1-3bbaaddf5f36 | sagar1024/mycppjourney | CP/Codeforces/9. TLEs CP sheet/Rated 1200/15. Stone age problem.cpp | // B. Stone Age Problem
// time limit per test2 seconds
// memory limit per test256 megabytes
// Once upon a time Mike and Mike decided to come up with an outstanding problem for some stage of ROI (rare olympiad in informatics). One of them came up with a problem prototype but another stole the idea and proposed that... | ALGO | 0.997202 | 4.762528 |
1d32a0c0-3e8b-4630-8566-54bb6c8c1b97 | himanshudadheech/chef | cpp/easy/Turbo Sort.cpp | //Problem Code : TSORT
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
int arr[t];
for(int i=0;i<t;i++){
cin>>arr[i];
}
sort(arr, arr+t);
for(int i=0;i<t;i++){
cout<<arr[i]<<endl;
}
}
| ALGO | 0.99994 | 4.789051 |
32d1a748-2e78-4120-99eb-2e0c9be3974f | XDEv11/Codeforces | Round#816_div2/C.cpp | //#pragma GCC optimize ("O3")
#include <ios>
#include <iostream>
#include <vector>
#include <optional>
#include <functional>
using namespace std;
// segment tree
// range query & range modify
template <typename value_t>
class SGT {
int n;
vector<value_t> t;
vector<optional<value_t>> lz;
// [ tv+1 : tv+2*(tm-tl) ... | ALGO | 0.999955 | 4.816853 |
51eabe83-c133-4a40-94e6-d5b8da264679 | SongeunKim/BeakJoon | 10811.cpp | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[100];
for (int i = 1; i <= n; i++) {
arr[i] = i;
}
for (int i = 1; i <= m; i++) {
int a, b;
cin >> a >> b;
for (int j = 0; j <= (b - a) / 2; j++) {
swap(arr[a + j], arr[b - j]);
}
}
for... | ALGO | 0.999975 | 3.607727 |
d02abb9e-b8bf-4ce3-add9-61eb04a2e803 | scslab/cowl | gfx/skia/trunk/src/core/SkUtils.cpp | #include "SkUtils.h"
#include "SkLazyFnPtr.h"
#if 0
#define assign_16_longs(dst, value) \
do { \
(dst)[0] = value; (dst)[1] = value; \
(dst)[2] = value; (dst)[3] = value; \
(dst)[4] = value; (dst)[5] = value; \
(dst)[6] ... | TOOL | 0.869993 | 6.785279 |
f743918e-9787-4654-aa57-64bdfa1d29ae | lopasole02/cholespy_copy | src/supn_cholesky_solver.cpp | //
// Created by Neill Campbell on 10/10/2022.
//
#include "supn_cholesky_solver.h"
#include "cuda_driver.h"
#include <algorithm>
#include <exception>
template <typename Float>
SupnCholeskySolver<Float>::SupnCholeskySolver(int n_rows, int nnz,
int *csr_lower_crows,
... | ALGO | 0.999021 | 4.867081 |
56b16e92-248a-4d4c-93d9-616268b1e5dd | SerPan23/mini_Project | filled_circle.cpp | #include "funcs.h"
void printar(vector <vector <char>> field) {
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
cout << (char)field[i][j] << " ";
}
cout << endl;
}
cout << endl;
}
int filled_circle(vector <vector <char>>& field, int x0, int y0, int radius, char c) {
int x = 0;
int y = r... | ALGO | 0.988727 | 4.270714 |
7251caf5-6036-471a-894c-6c8951a52f90 | YunzeWu/YunzeWu | 我的刷题记录/sdbsdfhj.cpp | #include<iostream>
using namespace std;
int main()
{
int n,cnt=0;
cin>>n;
for(int i=0;i<=n;i++)
{
for(int j=0;j<=i;j++)
{
for(int k=0;k<=j;k++)
{
if(i+j+k==n) cnt++;
}
}
}
cout<<cnt;
}
| ALGO | 0.999961 | 3.956559 |
5237b359-22ae-4a04-afb6-3344aa683f54 | ishandutta2007/codeforces | dorijanlendvaj/normal/1389/C.cpp | //DUEL
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define x first
#define y second
#define pii pair<int,int>
#define pb push_back
#define eb emplace_back
#pragma GCC optimize("unroll-loops")
#define shandom_ruffle(a, b) shuffle(a, b, rng)
#define vi vector<int>
#define vl vector<ll>
#define popcn... | ALGO | 0.999831 | 5.132454 |
4c0019ff-326a-4ec0-9f15-fa0212ab1771 | silence0201/iOS-Reverse | Obfuscator/Source/projects/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp | // <algorithm>
// template<RandomAccessIterator Iter>
// requires ShuffleIterator<Iter>
// && LessThanComparable<Iter::value_type>
// void
// push_heap(Iter first, Iter last);
#include <algorithm>
#include <random>
#include <cassert>
std::mt19937 randomness;
void test(int N)
{
int* ia = new int [N... | TEST | 0.991995 | 5.160758 |
e20ecbc4-e574-46e0-8230-3b444376e046 | pdpdds/scummvm4yuza | scummvm/engines/macventure/gui.cpp | /*
* Based on
* WebVenture (c) 2010, Sean Kasun
* https://github.com/mrkite/webventure, http://seancode.com/webventure/
*
* Used with explicit permission from the author
*/
#include "common/file.h"
#include "common/system.h"
#include "common/debug-channels.h"
#include "common/debug.h"
#include "image/bmp.h"
#inc... | TOOL | 0.867467 | 3.636009 |
0dec53e2-5c9c-4c0b-bcb7-8fd57e8689bf | ishandutta2007/codeforces | redstar_13/normal/261/E.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long INT;
inline int is_prime(int u) {
for(int i=2; i<u; i++) if(u % i == 0) return 0;
return 1;
}
#define NN 3001000
#define inf 0x3f3f3f3f
int tot = 0;
int L, R, p;
int all[NN];
int flag[NN];
int dp[NN];
inline int update(int q) {
int nn = to... | ALGO | 0.999906 | 3.179143 |
0f669710-51d1-420f-b240-2d46d8111ad1 | ShubhamtechCoder/CODING | chapter 3 (loop)/APbymaths.cpp | #include <iostream>
using namespace std;
int main ()
{
int n;
cout<<"Enter No. ";
cin>>n;
for (int i=4; i<=3*n+1; i+=3 ){
cout<<i<<" ";
}
} | ALGO | 0.998504 | 3.005795 |
abe95111-fd0c-493b-8a17-742af12b7a0a | sarvex/leetcode-giz | lcof2/剑指 Offer II 047. 二叉树剪枝/Solution.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.999806 | 6.544013 |
92336d84-7441-4ca1-8bd5-334fbcd7bdc5 | 18-RAJAT/ONLINE-JUDGE | A_Chips_Moving.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sza(x) ((int)x.size())
#define all(x) x.begin(), x.end()
#define revall(x) x.rbegin(), x.rend()
#define sortall(x) sort(all(x))
const int MAX_N = 2e5 + 5;
const ll MOD = 1e9 + 7;
const ll INF = 1e9;
#define revall(x) x.rbegin(), x.rend()
#de... | ALGO | 0.999813 | 3.626166 |
fe89c4b2-3e65-48fe-9434-be9886cd50e6 | Prathamesh-Kothalkar/Problem-Solving | Array/maxConsecutive1's.cpp | //Max Consecutive 1's
//i/p a=[1,1,0,0,1,1,1,0,0,1,1] o/p:-3
#include<iostream>
using namespace std;
int max1s(int a[],int n){
int count=0,max=0;
for(int i=0;i<n;i++){
if(a[i]==1){
count++;
}
else{
if(count>max){
max=count;
}
count=0;
}
}
if(count>max)//For last occurence
{
max=count;
}
... | ALGO | 0.999887 | 4.52941 |
de53209d-4490-4f70-9c56-c6b869ee0426 | jeankevinl137/JeankevinProg | derivates/main_deriv.cpp | #include <iostream>
#include <fstream>
#include "derivatives.h"
double f(double x);
int main(int argc, char **argv) {
std::cout.precision(15);
std::cout.setf(std::ios::scientific);
double x = 1.2345;
double exact_result = 2*x*std::cos(x*x);
// open file for writing
std::ofstream file("deriva... | ALGO | 0.997198 | 5.846532 |
6903dbb6-c506-4f1d-b5fd-376e49743df8 | samridhrana06/placement_coding | Array/merge_overlapping.cpp | #include<bits/stdc++.h>
#include<vector>
using namespace std;
vector<vector<int>> mergeOverlappingIntervals(vector<vector<int>> &arr){
// Write your code here.
sort(arr.begin(),arr.end());
int n = arr.size();
vector<vector<int>>ans;
for(int i=0;i<n;i++){
int start = arr[i][0];
int end = arr[i][1];
if(!an... | ALGO | 0.99996 | 6.15467 |
707b483f-7e5c-4d5b-a5ff-5e34f067afbd | AlgoLeadMe/AlgoLeadMe-7 | rivkms/DP/12865.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n, k;
cin >> n >> k;
vector<pair<int, int>> wv(n+1, pair<int, int>(0,0));
vector<vector<int>> value (n+1, vector<int>(k+1, 0));
for(int i = 1; i<=n; i++){
cin >> wv[i].first >> wv[i].second; ... | ALGO | 0.999987 | 3.671018 |
fc1a17cb-81a5-48d2-90b7-098d16c958b3 | gafeol/competitive-programming | Contests/NWERC16/J.cpp |
#include <bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++)
#ifndef ONLINE_JUDGE
#define debug(args...) //fprintf... | ALGO | 0.999991 | 3.458614 |
8460bddb-cef8-4923-af76-654898795715 | kuzudb/kuzu | extension/algo/src/function/strongly_connected_components.cpp | #include "binder/binder.h"
#include "binder/expression/expression.h"
#include "common/task_system/progress_bar.h"
#include "function/algo_function.h"
#include "function/component_ids.h"
#include "function/config/connected_components_config.h"
#include "function/config/max_iterations_config.h"
#include "function/gds/gds... | ALGO | 0.971254 | 7.828002 |
12e4c762-4ab7-42d1-80ee-b6d7f7923e03 | mdm2078/Chp5_PatternDisplay | Chp5_PatternDisplay/Chp5_PatternDisplay.cpp | // Chp5_PatternDisplay.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
using namespace std;
int main() {
// Introductory Statement
cout << "This program displays two patterns using loops." << endl;
cout << "Pattern A will display an increasing number of... | ALGO | 0.984939 | 5.142881 |
05b2e029-0aa4-4a62-99d9-2b5389f2830f | raincross7/code-similarity | codes/train_code/problem223/problem223_289.cpp | /* Simplicity and Goodness */
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
void my_dbg() { cout <... | ALGO | 0.999909 | 4.016109 |
b1dac607-07ca-479f-82d6-e6160c5c5e18 | BernJul/Heat-Simulation | sequential.cpp | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <time.h>
#include <unistd.h>
#ifdef GUI
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#include "./headers/physics.h"
int size; // problem size
void initialize(float *data) {
// intialize the temperature dist... | ALGO | 0.999784 | 5.263171 |
b6912cf6-5cfc-4270-9c5d-6988551ad174 | ampereira/F2Dock | src/fast-GB/fastDispE.cpp | #ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
#include "fastDispE.h"
using fastGB::fastDispE;
void fastDispE::freeMemory( void )
{
freeMem( atoms );
freeMem( qPoints );
freeMem( staticMol.atoms );
freeMem( staticMol.qPoints );
freeMem( movingMol.atoms );
freeMem( movingMol.qPoints );
}... | ALGO | 0.997549 | 4.267448 |
52111e2c-fab6-41ec-83b7-1cc68c24f8ba | HinaPE/HinaPE-Houdini | HinaPE/3rd_party/CUDA_CubbyFlow/Core/PointGenerator/GridPointGenerator2.cpp | #include <Core/PointGenerator/GridPointGenerator2.hpp>
namespace CubbyFlow
{
void GridPointGenerator2::ForEachPoint(
const BoundingBox2D& boundingBox, double spacing,
const std::function<bool(const Vector2D&)>& callback) const
{
Vector2D position;
const double boxWidth = boundingBox.Width();
const ... | ALGO | 0.992011 | 6.367544 |
16385f45-132e-4c5d-bb50-5e6ab64d4cbe | edgeofmoon/GraphView2017 | MyMultiGraphNodeVariationTask.cpp | #include "MyMultiGraphNodeVariationTask.h"
#include "MyGraphAlgorithm.h"
#include "MyGenericHierarchyOverlay.h"
MyMultiGraphNodeVariationTask::MyMultiGraphNodeVariationTask(void)
{
mTaskDescription = "Task 1: Of which network the highlighted node has higher degree centrality?";
}
MyMultiGraphNodeVariationTask::~MyMu... | ALGO | 0.900942 | 4.747569 |
dadcf0fc-f7fa-40f7-b707-e9afe372ec81 | R3nch00/CodeForces | How Much Does Daytona Cost.cpp | // mes que un club //
#import <bits/stdc++.h>
#define ll long long
#define f(n) for(int i=1;i<=n;++i)
using namespace std;
int main(){
int T,n,m,a,flag; cin>>T;
while(T--){
cin>>n>>m; flag=0;
f(n) cin>>a, flag=(a==m) ? 1: flag;
cout<<( flag ? "YES\n" : "NO\n");
}
}
| ALGO | 0.999873 | 3.959349 |
4176cec4-99d0-4e81-bb66-b78e89b6a00e | rakibhossain01/Phitron | Basic Data Structures/Module 2.5 vector practice/C_Replacement.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
vector<int> v1(n);
vector<int> v2;
for(int i=0;i<n;i++){
cin>>v1[i];
}
for(int x : v1){
if(x>0){
v2.push_back(1);
}
else if(x<0){
v2.push_back(2);
}
else{
v2.push_back(0);
}
}
for(int x : v2){
cout<<x<<" ";
}
... | ALGO | 0.999932 | 4.112329 |
914b7d74-727b-4baa-af64-6876f74dc33c | ctapmex/UnInstall | common/sysutils.cpp | #include "utils.hpp"
#include "sysutils.hpp"
HINSTANCE g_h_instance = nullptr;
wstring get_system_message(HRESULT hr, DWORD lang_id) {
wostringstream st;
wchar_t* sys_msg;
DWORD len = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, hr, lang_id... | TOOL | 0.898276 | 5.653074 |
16369bf7-ade4-4061-b993-021b2436759f | EzraCerpac/CSE_minor_octp | lammps-23Jun2022/src/OPENMP/pair_dpd_omp.cpp | // clang-format off
/* ----------------------------------------------------------------------
Contributing author: Axel Kohlmeyer (Temple U)
------------------------------------------------------------------------- */
#include "omp_compat.h"
#include "pair_dpd_omp.h"
#include <cmath>
#include "atom.h"
#include "co... | ALGO | 0.999513 | 6.837893 |
2bdc8d32-e476-4d7c-8fa9-d4650c45be11 | ArthurSampaio/CodigosExporadicos | C++/tempConvert.cpp | #include <iostream>
using namespace std;
float celsiusToFarenheint (float celsius){
return 1.8*celsius + 32;
}
float celsiusToKelvin (float celsius){
return celsius + 273;
}
int main() {
string type;
float celsius;
cin >> type >> celsius;
if (type == "f"){
cout << celsiusToFaren... | ALGO | 0.996445 | 4.280301 |
1ecd593f-2f09-4bba-a38d-82da77f70c47 | Rishi-11-2/CP | B_Kevin_and_Permutation.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using namespace chrono;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define debug(x...) { cout << "(" << #x << ")" << " = ( "; PRINT(x); }
tem... | ALGO | 0.999987 | 3.551157 |
10834d37-2b49-4b95-98a8-fd00bfde4b7d | raghav-7288/Coding | Others/Advanced-DSA-and-CS-Theory-master/Samsung R & D/BFS/13. Frog Jump.cpp | #include<bits/stdc++.h>
using namespace std;
int t, n, m, ans;
int a[100][100], dp[100][100];
struct point{
int x, y;
};
int xx[] = {-1, 0, 1, 0};
int yy[] = {0, 1, 0, -1};
bool valid(int x, int y){
if(x >= 1 and y >= 1 and x <= n and y <= m and a[x][y] == 1)return true;
return false;
}
void fun(int x, int y, int co... | ALGO | 0.999722 | 4.08105 |
3ee4f88d-ab71-4546-8aa2-5cb10581436a | sl1296/acm-code | hdu-6362-2 Accepted.cpp |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
double a,b;
double f(double y)
{
double t=y/b;
return (4*a*b*(t*sqrt(1-t*t)/2+asin(t)/2)+2*y*y)/b;
}
int main()
{
int ca;
scanf("%d",&ca);
while(ca--)
{
scanf("%lf%lf",&a,&b);
double ans=f(b)-f(0);
ll tm... | ALGO | 0.998643 | 3.770384 |
67e4f06f-894d-484f-aa8d-8d9568844d6b | niveditaprity/Competitive-Programming-Data-Structure | Recursion/sum sequence.cpp | #include<stdio.h>
long long int sum_sequence(long long int n)
{
if(n==1)
{ /* if n=1 then it should return 1 as from series s=1+(2*3)+.... */
return 1;
}
else
{
long long int mul=1+(n*(n-1))/2;
long long int sum=1;
long long int i;
for(i=1;i<=n;i++)
{
sum=sum*mul;
... | ALGO | 0.999947 | 4.506985 |
870982cc-df79-4644-850e-2343bd34d1f8 | divyanshece/LeetCode | 0349-intersection-of-two-arrays/0349-intersection-of-two-arrays.cpp | class Solution {
public:
vector<int> intersection(vector<int>& nums1, vector<int>& nums2) {
set<int>numsA(nums1.begin(), nums1.end());
set<int>numsB(nums2.begin(), nums2.end());
set<int>result;
vector<int>ans;
set_intersection(numsA.begin(), numsA.end(), numsB.begin(), numsB.... | ALGO | 0.999867 | 5.466759 |
8dbf25c8-9a66-4f5b-892d-1cc0605c3e0a | karimali03/Competitive-programming | solutions/archive/contests/RTC/daily challange #1/B_Money_Buys_Happiness.cpp | #include <bits/stdc++.h>
using namespace std;
#define ln "\n"
#define ll long long
#define ld long double
#define ull unsigned long long
#define vec vector
#define vi vector<int>
#define vii vector<vector<int>>
#define viii vector<vector<vector<int>>>
#define f(i, a, b) for(int i = a; i < b; i++)
#define all(x) (x).be... | ALGO | 0.999859 | 4.250332 |
c3821b98-4f46-4538-aeee-93656b2515c8 | pollitoconpapass/allocatorPP | passing-by/address-exercises/ex1.cpp | // Write a function that takes three integers by address and:
// - Doubles the first number
// - Triples the second number
// - Quadruples the third number
#include <iostream>
using namespace std;
void returnThreeNumbers(int *num1, int *num2, int *num3){
int doubleNum = (*num1) * 2;
int tripleNum = (*num2) * ... | ALGO | 0.998887 | 5.17452 |
df6b959a-1af5-442e-9ac5-9f36f08d6d64 | ishandutta2007/codeforces | fsouza/normal/666/B.cpp | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <vector>
#define MAXN 3000... | ALGO | 0.999991 | 3.522153 |
921388ee-d29c-4823-8f89-1eda85b3c8a7 | kblache/Exercices-CPP | ExercicesCPP/GuessMyNumberComputer/GuessMyNumberPC.cpp | #include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main(int argc, char** argv)
{
bool numberFound = false;
bool endProgramme = false;
int computerGuess = 10;
int numberOfTry = 0;
int playerNumber;
while (!endProgramme)
{
cout << "Billy can try to guess your number." << endl;
cout <... | ALGO | 0.963936 | 3.106916 |
a45c35a1-e0a9-45ad-8b9b-45b18840b170 | hal-uw/gpu_variability_sc22_artifact | sec5c_lammps/lib/gpu/lal_beck.cpp | /***************************************************************************
beck.cpp
-------------------
Trung Dac Nguyen (ORNL)
Class for acceleration of the beck pair style.
______________________________________________... | TOOL | 0.975442 | 7.118328 |
659e5658-d901-4f28-af76-ae5f6afaf7f6 | kroma-network/ffiasm | c/naf.cpp | #include "naf.hpp"
static uint64_t NAFTable[1024];
bool buildNafTable() {
for (int in=0; in<1024; in++) {
bool carry = (in & 0x200);
bool last = (in & 1);
uint8_t res[8];
for (int i=0; i<8; i++) {
bool cur = in & (1 << (i+1));
if (last) {
if... | ALGO | 0.99159 | 3.651726 |
fe61a6d4-a752-447a-9e00-072f01785f04 | AbhisekhNayek/Proelevate-45-Days-DSA-Challange | Subtree of Another Tree.cpp | class Solution {
public:
bool isSameTree(TreeNode* s, TreeNode* t)
{
if (!s && !t)
return true;
if (!s || !t)
return false;
if (s->val != t->val)
return false;
// Recursively check left and right subtrees
return isSameTree(... | ALGO | 0.999978 | 7.32074 |
872bdd96-cb65-4d67-9220-39aa9c109577 | Jonarck/Some-Tiny-Course-Projects-in-SEU | SEUAI5857 Computer Graphics/fianl project/58119125_蒋卓洋_期末实验源文件/Voronoi Remesh with Vector cluster/dependencies/igl/copyleft/cgal/orient2D.cpp | #include "orient2D.h"
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
template<typename Scalar>
IGL_INLINE short igl::copyleft::cgal::orient2D(
const Scalar pa[2],
const Scalar pb[2],
const Scalar pc[2])
{
typedef CGAL::Exact_p... | ALGO | 0.999371 | 5.718632 |
3909079b-b918-4614-8276-2daeb3ebf3d3 | datagrove/datagrove_dart | dg_viewtabs/example/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.998441 | 6.785645 |
f9d55570-42d9-4e29-b52d-87cf8cd68139 | tips367/Algorithms | Dynamic Programming/Ugly Numbers/Ugly Numbers.cpp | /* Ugly numbers are numbers whose only prime factors are 2, 3 or 5.
The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, shows the first 11 ugly numbers. By convention, 1 is included.
Given a number n, the task is to find nth Ugly number.
Examples:
Input : n = 7
Output : 8
Input : n = 10
Output : 12
Input : n =... | ALGO | 0.999976 | 6.652288 |
334f2fe3-a404-4c24-a573-83d9bf43f37c | gauravk268/Competitive_Coding | CodeChef/Long-Challenge_Feb2021/Highest_Divisor.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pi> vpi;
#define f first
#define s second
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end... | ALGO | 0.999977 | 4.583045 |
b9653ecb-fe23-413d-82d7-7c244586feff | GusteJasiukaityte/c-darbai | Aritmetikos užduotys/main.cpp | //prijungiame bibliotekas
#include <iostream> // biblioteka programoje atsakinga už tokias komandas kaip cout ir cin.
#include <fstream> // biblioteka programoje atsakinga už tokias komandas ifstream ir ofstream.
#include <iomanip> // biblioteka programoje nuskaito setprecision komandą.
#include <cmath> // biblioteka p... | ALGO | 0.998227 | 3.540365 |
37b3bec1-6597-40ac-abd6-1acc40ae5a5c | howellcat/daimayuan_L1 | 1002.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
while (a >= b) {
int a1, a2, a3, a4;
a1 = a / 1000 % 10;
a2 = a / 100 % 10;
a3 = a / 10 % 10;
a4 = a % 10;
if (a1 == 7 || a2 == 7 || a3 == 7 || a4 == 7)
cout << a... | ALGO | 0.989389 | 3.748327 |
367c40ec-1fcd-45f7-a271-cf0d944c7eb7 | ishandutta2007/codeforces | pacu/normal/605/C.cpp | #include <iostream>
#include <iomanip>
using namespace std;
double a[100000],b[100000];
int p,q;
int N;
bool works(double x)
{
double low = -x;
double high = x;
for(int i=0;i<N;i++)
{
if(a[i]-b[i]==0)
{
if(1-(a[i]+b[i])*x < 0) return 0;
}
else if(a[i]-b[i]>0)
{
high = min(high,(1-(a[i]+b[i])*x)/(a... | ALGO | 0.99996 | 3.643066 |
e4c0bb7b-40f1-4d3e-8533-d1df64fdd9e5 | doctording/consistent_hash_cplusplus | codes_02/main.cpp | /*
* =====================================================================================
*
* Filename: main.cpp
*
* Description:
*
* Version: 1.0
* Created: 2017-03-17
* Revision: none
* Compiler: ms vs2013
*
* Author: https://github.com/doctording
*
* ================... | TEST | 0.932809 | 5.058847 |
5c94e70b-6318-4632-befa-bf2be4c74053 | LSH3333/PS | baekjoon/9507.cpp | #include <iostream>
using namespace std;
long long d[80];
int main()
{
d[0] = 1; d[1] = 1;
d[2] = 2;
d[3] = 4;
for(int i = 4; i <= 68; i++)
{
d[i] = d[i-1] + d[i-2] + d[i-3] + d[i-4];
}
int T; cin >> T;
while(T--)
{
int N; cin >> N;
cout << d[N] << '\n';
... | ALGO | 0.999922 | 4.187343 |
0f6d7523-f486-43a9-8acb-7ffee0cfbe96 | github991127/postgraduate | Foundation/LinkNode.cpp | #include <iostream>
using namespace std;
struct node
{
char ch;
node* next;
};
void show(node* head) //输出链表
{
node* p = head;
cout << "链表中的字符逆序输出为:\n";
while (p)
{
cout << p->ch;
p = p->next;
}
cout << endl;
}
//链表输入字符串,逆序输出
int main()
{
system("chcp 65001");
n... | ALGO | 0.999886 | 3.603275 |
5a3c24a4-0afb-485c-a37a-59a7ad6f0e07 | Abhishekjha002/Competitive_programming | leetcode/Graph/787. Cheapest Flights Within K Stops.cpp | class Solution {
public:
int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int K) {
vector<vector<pair<int,int>>> graph(n);
for(vector<int>& arr : flights)
{
graph[arr[0]].push_back({arr[1], arr[2]});
}
priorit... | ALGO | 0.999899 | 5.822443 |
d66a0d35-48e5-4ada-a38d-7e18a27e46c5 | laureansvictor/AEDA-2019-2020 | Prática 11 - (Conjunto disjuntos)/aeda1920_fp11/Tests/disjointSets.cpp | #include "disjointSets.h"
DisjointSets::DisjointSets()
{}
DisjointSets::DisjointSets(const DisjointSets &m1){
this->set = m1.set;
}
// create n disjoint sets (one for each item)
DisjointSets::DisjointSets(int n) {
for (int i = 0; i < n; i++)
set.push_back(-1);
}
// Find the root of the set in which ... | ALGO | 0.985422 | 3.946814 |
a79bdc01-634c-4020-b05c-0dc71a95aebd | Next-Gen-UI/Code-Dynamics | Leetcode/0509. Fibonacci Number/0509.cpp | class Solution {
public:
int fib(int N) {
if (N < 2)
return N;
vector<int> dp{0, 0, 1};
for (int i = 2; i <= N; ++i) {
dp[0] = dp[1];
dp[1] = dp[2];
dp[2] = dp[0] + dp[1];
}
return dp.back();
}
};
| ALGO | 0.999982 | 6.731703 |
197e3860-c01e-4103-ab1c-7a07687ff2b6 | ishandutta2007/codeforces | belonogov/normal/763/B.cpp | #include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <queue>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
using namespace std;
#define F first... | ALGO | 0.9991 | 3.048174 |
635097dc-689d-4e6c-9d69-cf5c3f35104d | mhussin2008/firebase_auth | namer/step_05_c_card_padding/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.996894 | 6.76073 |
9118728e-ac04-4fba-bf28-e70177642ba8 | AI-Cortex/Codewars_Solution | code c++/Playing with digits.cpp | // my profile : https://www.codewars.com/users/AI-Cortex
// Codewars solution github repository : https://github.com/AI-Cortex/Codewars_Solution
//////////////////////////////////////////////////////////////////////
// name : Playing with digits
// link : https://www.codewars.com/kata/5552101f47fc5178b1000050
#include... | ALGO | 0.999921 | 5.737306 |
31dc3179-27ca-44d6-8799-9a7c48b7a680 | Nakib-Arman/CSE318---ArtificialIntelligence | 3.ChainReaction/.history/main_20250610092521.cpp | #include <bits/stdc++.h>
using namespace std;
#define DEPTH 3
class Cell {
int orb_num;
int critical_mass;
char color;
public:
Cell() {
this->orb_num = 0;
this->color = 'W';
this->critical_mass = 4;
}
// Cell(int orb_num, char color) {
// this->orb_num = orb_... | ALGO | 0.99857 | 4.722574 |
5e8d0833-ff29-4a83-b883-62b1cff118bc | ManishxNinja/DSA-Code | EssetialTopics/insertioncll.cpp | #include<iostream>
using namespace std;
class node{
public:
int data;
node *next;
};
class linkedlist{
private:
node *first;
public:
linkedlist(){first = NULL;}
linkedlist(int a[],int n);
void insertion(int pos,int x);
void display();
};
linkedlist ::linkedlist(int a[],int n)... | ALGO | 0.999894 | 3.72541 |
33d8f841-67c3-4426-b0c7-7957e1777582 | ayush-yadav-4/leetcode-solutions | 0372-super-pow/0372-super-pow.cpp | class Solution {
public:
const int MOD = 1337;
// Fast power modulo
int modPow(int a, int k) {
a %= MOD;
int result = 1;
for (int i = 0; i < k; ++i) {
result = (result * a) % MOD;
}
return result;
}
int superPow(int a, vector<int>& b) {
i... | ALGO | 0.999935 | 6.030571 |
7c3ce669-99c4-4ea2-bb88-dec9df9ca316 | piyush1146115/Competitive-Programming | Intra University Contest/MBSTU individual contest on bin search 29 march, 2017/A - Triangle Partitioning.cpp | #include<bits/stdc++.h>
using namespace std;
double area(double a, double b, double c)
{
double s = (a + b + c)/2.0;
double ans = sqrt(s * (s - a) * (s - b)*(s - c));
return ans;
}
int main()
{
int test;
scanf("%d", &test);
for(int tc = 1; tc <= test; tc++){
double ab, ac, bc, rat;... | ALGO | 0.99981 | 3.587101 |
8281a675-c3de-41f6-8002-6f962dcaebd5 | FrnkPsycho/C-- | CSUOJ/12.15/d.cpp | #include <bits/stdc++.h>
#define MAX 100005
using namespace std;
vector<int> arr1;
vector<int> arr2;
vector<int> arr3;
int main()
{
int n,m,q;
map<long long,int>num;
while ( cin >> n >> m >> q )
{
for (int i = 0; i < n; i++)
{
long long t;
cin >> t;
... | ALGO | 0.999876 | 3.252967 |
fdfa855a-d8a4-4d5d-b8b1-1037b062078d | Jack-Archer/cpp-search-server | search-server/string_processing.cpp | #include "string_processing.h"
#include "search_server.h"
#include <algorithm>
#include <numeric>
std::vector<std::string_view> SplitIntoWords(std::string_view str) {
std::vector<std::string_view> result;
str.remove_prefix(std::min(str.size(), str.find_first_not_of(' ')));
while (!str.empty()) {
... | TOOL | 0.981224 | 4.600368 |
ad33517d-cf00-4e54-a0a2-9bbbeca9553b | SecTechTool/Chronos | workload/geth/LOKI/src/FISCO-BCOS/libdevcore/TrieHash2.cpp | /**
* @CopyRight:
* FISCO-BCOS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FISCO-BCOS is distributed in the hope that it... | ALGO | 0.999608 | 6.020966 |
a93c3acc-33f5-4c0f-8e2f-56c471358eef | darkinfusion/packages-inputmethods-LatinIME | native/jni/src/suggest/core/dicnode/dic_nodes_cache.cpp | #include <list>
#include "defines.h"
#include "suggest/core/dicnode/dic_node_priority_queue.h"
#include "suggest/core/dicnode/dic_node_utils.h"
#include "suggest/core/dicnode/dic_nodes_cache.h"
namespace latinime {
// The biggest value among MAX_CACHE_DIC_NODE_SIZE, MAX_CACHE_DIC_NODE_SIZE_FOR_SINGLE_POINT, ...
cons... | TOOL | 0.895411 | 6.894089 |
e3bf8b30-944f-4a5e-8245-c23b25f61ec9 | Coder-Vippro/Code | Archived/GiaHung/main (102).cpp | #include <iostream>
using namespace std;
int a,b,c;
int main()
{
cin>>a>>b>>c;
if(a>b && b>c && a>c)
{
cout<<a+b;
}
if(a>b && c>b && a>c)
{
cout<<a+c;
}
if(b>a && c>a && b>c)
{
cout<<a+c;
}
if(b>a && a>c && b>c)
{
cout<<a+b;
}
if(c... | ALGO | 0.999984 | 3.302185 |
3bddf455-f8f9-4438-8d5b-16fff359cf52 | stellaraccident/iree-forge | trees/llvm-project/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp | #include "llvm/Transforms/Instrumentation/ControlHeightReduction.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/OptimizationR... | TOOL | 0.995392 | 5.71294 |
125479f5-0c96-4af0-98ab-1a83e39e5161 | JulAleks/OOP345 | WS07/part 2/CovidCollection.cpp | /*************** WS 07_02 - CovidCollection Module - CovidCollection.cpp ********************
Name: Julia Alekseev
Seneca Student ID: 051292134
Seneca email: <EMAIL>
Date of completion: 2023-11-11
I have done all the coding by myself and only copied the code that my professor
provided to complete my workshops a... | TOOL | 0.903238 | 6.332872 |
0aedfc65-4513-4179-a53d-4dbee54e3c4a | rmcc/android_frameworks_base | media/libstagefright/codecs/amrnb/enc/src/lag_wind.cpp | /*
------------------------------------------------------------------------------
Pathname: ./audio/gsm-amr/c/src/lag_wind.c
Date: 01/31/2002
------------------------------------------------------------------------------
REVISION HISTORY
Description:
1. Eliminated unused include files.
... | ALGO | 0.998883 | 6.65848 |
a4f1875a-ade4-4a3a-8df3-d8486586c849 | Stevenzhang1234/Project2 | 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.998799 | 6.776823 |
8d756e1d-b6b1-4a36-a3bb-2870a8d67598 | libinghope/my-code-diaries | 005-数据结构与算法/exercises/6.z-字形变换.cpp | /*
* @lc app=leetcode.cn id=6 lang=cpp
*
* [6] Z 字形变换
*
* https://leetcode-cn.com/problems/zigzag-conversion/description/
*
* algorithms
* Medium (47.06%)
* Likes: 615
* Dislikes: 0
* Total Accepted: 110.5K
* Total Submissions: 233.9K
* Testcase Example: '"PAYPALISHIRING"\n3'
*
* 将一个给定字符串根据给定的行数,以... | ALGO | 0.999946 | 6.600572 |
5f0a3dc2-6a0c-48ec-9e26-93cd6eda3739 | MadhavGupta2004/codeforces | sumofothertwo.cpp | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<math.h>
#include<unordered_set>
#include<unordered_map>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int a,b,c;
cin>>a>>b>>c;
if(a+b==c || a+c==b || b+c==a){
cout<<"YES"<<endl;
}
else cout<<"NO"<<endl;
}
}
| ALGO | 0.999926 | 4.472981 |
b7b93597-a92b-4dfa-b3a2-11cab622ab8e | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/12/65/19.cpp | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
using namespace std;
typedef long long Int;
typedef p... | ALGO | 0.999674 | 3.446494 |
f7b13c0f-d01e-4063-a71b-8d53d66a8991 | crimson000000/OIcode | CF/CF1320D.cpp | #define LOCAL
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> PII;
inline int read()
{
int x = 0, f = 1;
char ch = getchar();
while(ch < '0' || ch > '9')
{
if(ch == '-') f = -1;
ch = getchar();
}
while (c... | ALGO | 0.999979 | 4.018347 |
30a4968f-9291-4a0f-83e3-c12d59661a17 | PolygonTek/BlueshiftEngine | Source/ThirdParty/Bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp | #include "btConvex2dShape.h"
btConvex2dShape::btConvex2dShape(btConvexShape* convexChildShape) : btConvexShape(), m_childConvexShape(convexChildShape)
{
m_shapeType = CONVEX_2D_SHAPE_PROXYTYPE;
}
btConvex2dShape::~btConvex2dShape()
{
}
btVector3 btConvex2dShape::localGetSupportingVertexWithoutMargin(const btVector3... | ALGO | 0.93183 | 7.572961 |
f665b25b-0bde-4fcb-9ee5-76247ab5b476 | carttman/Backjoon | Bronze/11050_이항 계수 1.cpp | #include <iostream>
using namespace std;
int Factorial(int num)
{
if (num == 0)
{
return 1;
}
int sum = 1;
for (int i = num; i >= 1; i--)
{
sum *= i;
}
return sum;
}
int main()
{
int N, K;
cin >> N >> K;
cout << Factorial(N) / (Factorial(K) * Factorial(N - K));
return 0;
} | ALGO | 0.999942 | 5.075955 |
edcd512a-888b-4c69-b86e-17a35ac2b3d2 | phanan04/Code-PTIT | CodePTIT - CPP/CP01012.cpp | // https://code.ptit.edu.vn/student/question/CP01012
// BỘ BA SỐ PYTAGO
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
void TestCase()
{
int n;
cin >> n;
long long a[n];
for (int i = 0; i < n; ++i)
cin >> a[i];
sort(a, a + n);
long long *it;
for (int i = 0; i + 2 ... | ALGO | 0.999905 | 4.488924 |
039137c1-24dd-4c64-82ff-991b32cbe60c | Iwakura9/Estudos-ICPC | Exercicios/CSES/Introdutory/2-Missing.cpp | #include <bits/stdc++.h>
using namespace std;
bool ar[200005];
int main(){
int n;
cin >> n;
for(int i=1, x; i < n; ++i){
cin >> x;
ar[x] = true;
}
for(int i=1; i <= n; ++i){
if(!ar[i]){
cout << i;
break;
}
}
}
| ALGO | 0.999902 | 3.82183 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.