uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
94a555de-25ab-43e5-9811-3b862dd5f656 | lamanh2003/DSA_Remake | DSA/Data_Structures_and_Algorithms_PTIT-main/Queue/DSA08021 - DI CHUYỂN TRONG MA TRẬN.cpp | // Created by Nguyễn Mạnh Quân
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define sz size()
#define ll long long
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define FORD(i, a, b) for(int i = a; i >= b; i--)
#define F(i, a, b) for(int... | ALGO | 0.999934 | 4.493414 |
58ac2584-32ea-4393-9904-efc04d40d047 | icizay/cp | lib/dfs tree/scc_tarjan_ex.cpp | #include <bits/stdc++.h>
using namespace std;
int n, iter, scc;
vector<vector<array<int, 2>>> adj;
vector<int> num, low;
vector<bool> vis;
stack<int> st;
void dfs(int u){
low[u] = num[u] = iter++;
st.push(u);
vis[u] = true;
for(auto &[v, w] : adj[u]){
if(num[v] == -1) dfs(v);
if(vis[v]) low[u] =... | ALGO | 0.999902 | 5.528328 |
9f53360d-b43b-44c9-aa10-73476e8153fd | kk2a/library | verify/yosupo_ds/ds_static_range_sum.test.cpp | #define PROBLEM "https://judge.yosupo.jp/problem/static_range_sum"
#include "../../data_structure/prefix_sum.hpp"
#include "../../template/template.hpp"
using namespace std;
int main() {
int n, q;
kin >> n >> q;
vc<i64> a(n);
kin >> a;
kk2::PrefixSum<i64> ps(a);
rep (q) {
int l, r;
... | ALGO | 0.999704 | 5.678695 |
7171bbd1-031b-4202-9e0c-898c8b8017dd | qwazwak/CSC1310 | Labs/Lab-09/Lab9.cpp | /* Title: Lab 09
* Author: Rus Hoffman and Braedin Jared
* Date: November 11th, 2018
*/
#include "Random.h"
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <cmath>
using namespace std;
void sortArray(size_t* arr, size_t arraySize) {
int i, j;
for (i = 0; i < arraySize - 1; i... | ALGO | 0.999729 | 4.202757 |
23a4ffa8-fa41-4759-b845-7efbf110b2eb | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_6436_5.cpp | #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
int n,m;
cin >> n >> m;
long *x=new long[n],*y=new long[n],*z=new long[n],*tmp=new long[n];
for(int i=0;i<n;i++)
{
cin >> x[i] >> y[i] >> z[i];
}
long ans=0;
for(int a=-1;a<2;a+=2)
for(int b=-1;b<2;b+=2)
f... | ALGO | 0.999934 | 3.45179 |
8e1477ea-3660-483d-a4a0-c24c6da685ac | jdgre1/driverless_car_hobby_project | src/contourDetector.cpp | #include <contourDetector.h>
using namespace cv;
using namespace std;
void ContourDetector::detectObject() {
vector<vector<Point>> contours_;
vector<Vec4i> hierarchy;
setImgProcessed(false);
cv::Mat temp, temp2;
m_preprocessImg.roiImg = LineDetector::getCurrImg()(getRoiBox()).clone();
// 1. Blur
if (m_prepr... | ALGO | 0.878613 | 5.561293 |
9b5c6b77-b672-45eb-a514-ec67ee95a7ff | davidpuzey/Vision-Enabled-Robot | vision/ball_detect.cpp | #include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
using namespace cv;
const double PI = 3.141592;
int main(int argc, const char** argv) {
// CvFont font;
//cvinitFont(&... | TOOL | 0.890053 | 4.551882 |
2a029842-a4d6-4d35-a03d-6e757c6110b9 | ishandutta2007/codeforces | qpedop_muxaujlobu4/normal/1360/H.cpp | #include<iostream>
#include<vector>
#include<stack>
#include<cmath>
#include<algorithm>
#include<set>
#include<map>
#include<string>
#include<tuple>
#include<queue>
using namespace std;
int gcd(int i, int j) {
if (j == 0)return i;
else return gcd(j, i % j);
}
template<typename T> inline T getint() {
T val =... | ALGO | 0.99999 | 4.061117 |
664cf81d-5de4-4cdd-a1f9-3f47295b565b | JonasMoreira01/obi_folder | results/results/parcelamento.cpp | // OBI-2019, prestacao, Guilherme A. Pinto
#include <iostream>
using namespace std;
int main(){
int V, P;
cin >> V >> P;
int quociente = V/P;
int resto = V%P;
for( int i = 0; i < resto; i++ )
cout << quociente+1 << endl;
for( int i = 0; i < P-resto; i++ )
cout << quociente << endl;
return ... | ALGO | 0.999932 | 3.433869 |
d6ec501b-7fda-45b2-b541-e711b8cf1846 | M0onburst/IPK | uebung02/collatz.cpp | #include <cmath>
#include <iostream>
void collatz(int number) {
int x;
x=number;
while (x>1 && (x!=0 || x!=-5)) {
if ( x % 2 == 0 ) {
x=x/2;
}
else {
x=x*3+1;
}
std::cout<<"Ergebnis: "<<x<<std::endl;
}
}
int main(int argc, char** argv)
{
int n;
std::cout << "n=" << std::flush;
std::cin >> n;
... | ALGO | 0.999874 | 4.823059 |
fa9cba1c-7da8-4881-a9a7-0736a24813d3 | JulianQuinteroM/Lab3part2 | encription.cpp | #include "encription.h"
void encrypt(string name, string text, short method, int seed){
if(method == 1){
text = text_to_bin(text);
text = encrypt_method_1(text, seed);
text = bin_to_text(text);
write_file(name+".dat", text);
}
else if(method == 2){
unsigned lo... | ALGO | 0.998654 | 4.518346 |
51158912-37b8-4798-ad62-2164ad4a9cf0 | stamp070/Numer | graphicalmethod.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
double equation(double x);
int main()
{
double y, z;
for (int i = 0; i <= 10; i++)
{
double f = equation(i);
if (f * equation(i + 1) < 0)
{
y = i;
z = i + 1;
}
}
for (double i = ... | ALGO | 0.999836 | 4.097411 |
06ee1bd6-5fce-4b63-9c1f-dd5e688118d8 | viniscoelho/uva | 10489.cpp | #include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
long long t, n, b, m, y;
cin >> t;
for (int i = 0; i < t; ++i) {
cin >> n >> b;
long long sum = 0;
for (int j = 0; j < b; ++j) {
long long resp = 1;
cin >> y;
... | ALGO | 0.999407 | 3.413694 |
937153a4-15c1-4409-aaba-6cfac7cec34b | jasongbragg/PlantPopGenFit | src/main.cpp | // load Rcpp
#include <Rcpp.h>
#include "simulation_functions.h"
using namespace Rcpp;
// [[Rcpp::export]]
List simulation(int tsteps, NumericVector mortality, IntegerMatrix demo, IntegerMatrix gt, IntegerVector K, NumericMatrix dispersal, double selfing, NumericVector locus_effect, NumericVector dominance_effect, Nu... | ALGO | 0.998796 | 5.830098 |
2a05ea25-8b9d-477e-a2fa-394edf277568 | rpycgo/Algorithm | BOJ/C++/Dynamic Programming/9465.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<vector<int>> stickers, int n) {
if (n >= 2) {
stickers[0][1] += stickers[1][0];
stickers[1][1] += stickers[0][0];
}
for (int i = 2; i < n; i++) {
stickers[0][i] = max(stickers[0][i] + stickers[1][i - 1], sti... | ALGO | 0.999932 | 5.299972 |
9fec8166-9b81-4981-b209-1f434fc0da6c | m-bronnikov/Courses | way_of_c++/white_belt/3_week/structures/sorted_strings.cpp | #include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
class SortedStrings {
public:
void AddString(const string& s) {
storage.insert(s);
}
vector<string> GetSortedStrings() {
vector<string> ans;
ans.reserve(storage.size());
for(const a... | ALGO | 0.999808 | 5.700194 |
5de30dc8-9f62-491c-8ea7-4cf03379267a | sarvex/leetcode-haxe | solution/0600-0699/0663.Equal Tree Partition/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.999937 | 6.19662 |
a63a29db-ef96-4c4e-99ec-9b51df9af1ea | darynachernobrovkina/homework | task 2.0.23.cpp | #include <iostream>
#include <ctime>
static const int N = 6;
using std::cout;
using std::cin;
using std::endl;
void print_arr(int arr[], int N)
{
cout << endl;
for(int i=0; i<N; i++)
{
cout << arr[i] << " ";
}
}
double zalik(int arr[], int N)
{
int maxx=arr[0], minn=arr[0];
double su... | ALGO | 0.995247 | 4.57457 |
7db64c8a-0c24-4686-9527-c003e05f3f0d | chentong2015/CppMasterProject | data_structure/list/ListDemo.cpp | #include <iostream>
#include <list>
#include <functional>
// std::list 自带相关操作的API
int main() {
std::list<int> list1 {50, 10, 30, 20, 25, 5};
for(auto item : list1) {
std::cout << item << " ";
}
list1.sort();
list1.sort(std::greater<int>());
bool isFound = std::binary_search(list1.begi... | TOOL | 0.998568 | 4.968315 |
345e49d9-315e-4b8e-8f9b-ff732e20e65e | raincross7/code-similarity | codes/train_code/problem391/problem391_240.cpp |
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
const double PI = acos(-1);
const int inf = 2e9;
const long long INF = 2e18;
const long long MOD = 1e9+7;
#define sx(s) (s).size()
#define pb push_back
#define fi first
#define se second
#define REP(i,n) for (int i = ... | ALGO | 0.999991 | 3.83655 |
e5bfcdb2-f0b7-49d4-94c9-bfa8c5aa232c | anonymouswin/Blockchain | 3.Auction/MVTO-Fork-Join/Graph/Fine/Graph.cpp | /********************************************************************
| ***** File: Graph.h ***** |
| ***** Created: on Aug 01, 2018,05:40 PM ***** |
********************************************************************/
#include "Graph.h"
/******************... | ALGO | 0.895757 | 4.498057 |
43500700-63d0-4827-83cc-8b37d66f511b | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_12621_4.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
using namespace std;
template <class T>
ostream &operator<<(ostream &str, vector<T> &a) {
for (... | ALGO | 0.999667 | 5.234492 |
7e399bcd-3e67-4f90-bb5d-7e88df872741 | ashikurrahmanbhuiyan/codeforces | edu-153/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define el "\n"
#define in(a) int a=1; cin >> a;
#define int long long int
#define vi vector<int>
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/__gcd(a,b)
#define lb(arr,n,t) lower_bound(... | ALGO | 0.999152 | 4.602249 |
df3eb09f-141d-4011-9234-09ae4399dce5 | Anton-ui/CompNetwork | Unix3/3/main.cpp | //g++ main.cpp -o main -pthread -std=c++11
#include <pthread.h>
#include <unistd.h>
#include <iostream>
#include <semaphore.h>
using std::cout;
using std::cin;
using std::endl;
using std::flush;
using std::hex;
using std::dec;
void Status(int, const char*);
void Error(const char*);
const useconds_t S1 = 1500000;//
... | ALGO | 0.882073 | 4.302525 |
ad249fb6-724d-4017-9059-ecd1f0b63195 | HyeonHak/PS | 카카오/2018_카카오_n진수 게임.cpp | #include <string>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<char>vec;
string change_value(int n, int val){
//n 진법, val 원본 값
string ret;
while (val)
{
int tmp = val % n;
if (tmp >= 10)
ret += 10 - tmp + 'A';
else
ret += tmp + '0';
val /= n;
}
reverse(r... | ALGO | 0.999779 | 5.640337 |
dc9261ab-dcd8-46c0-9027-b3407beb5045 | GiacomoGarbin/3D-Game-Programming-with-DirectX11 | Chapter 02 Matrix Algebra - XNA Matrices/main.cpp | #include <iostream>
#include <directxmath.h>
using namespace DirectX;
std::ostream& operator<<(std::ostream& os, XMVECTOR const& v)
{
XMFLOAT4 t;
XMStoreFloat4(&t, v);
os << '(' << t.x << ',' << t.y << ',' << t.z << ',' << t.w << ')' << '\n';
return os;
}
std::ostream& operator<<(std::ostream& os, XMMATRIX con... | ALGO | 0.998938 | 5.475949 |
8c120573-84f2-4f86-a587-a6f54598c064 | aomiki/ssau-general-programming | 1year/1semester/LR/OP/LR1_4/Program.cpp | // Расчет параметров угла
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "RU");
int angle;
double pi = atan(1) * 4;
//do {
cout << "Введите значение угла в градусах: ";
cin >> angle;
cout << "sin(" << angle << ") = " << sin(angle * pi / 180.0) << endl;
... | ALGO | 0.996646 | 3.494369 |
325d434f-fe5e-4e72-8cbc-f3d7aaaeb1f4 | vphuong712/CPP-PTIT | CPP0333.cpp | #include<iostream>
#include<string>
using namespace std;
int main() {
string name;
getline(cin, name);
int a = name.find_last_of(" ");
string s = name.substr(a + 1, 100);
name.erase(a, 100);
int y = 0;
for (int i = 0; i < name.length(); i++){
y++;if (name.at(i) != ' ')break;
}
for (int i = y-1; i < name.len... | ALGO | 0.99827 | 3.859061 |
24b75d1f-d10c-42f0-82ae-60f3001310e4 | dlwnddh/SSAFY_Study | 220726_Algorithm_recursive/재귀호출1_2.cpp | /*
9 8 7 6 5 6 7 8 9
*/
#include <iostream>
using namespace std;
void run(int x)
{
cout << x << " ";
if (x == 5) return;
run(x - 1);
cout << x << " ";
}
int main()
{
run(9);
return 0;
} | ALGO | 0.999921 | 4.512645 |
d3d1980a-a7a0-4065-819d-73aeb434c54c | InvisibleQAQ/my_leetcode | 2C++/213.cpp | #include "cpp_header.h"
/**
* @brief 动态规划迭代解法
* 执行用时:0 ms, 在所有 C++ 提交中击败了100.00%的用户
* 内存消耗:7.7 MB, 在所有 C++ 提交中击败了45.06%的用户
*/
class Solution {
public:
int rob(vector<int>& nums) {
if (nums.size() == 1) return nums[0];
if (nums.size() == 2) return max(nums[0], nums[1]);
return max(robbe... | ALGO | 0.999967 | 5.709895 |
1a44484c-16ee-404b-a11e-e3b8f42b747a | aryandelwadia/Coding-Questions | Coding Ninja/Add Two Numbers.cpp | //Link
//https://www.naukri.com/code360/problems/add-two-numbers-as-linked-lists_1170520
#include<math.h>
/**
* Definition of linked list:
*
* class Node {
* public:
* int data;
* Node *next;
* Node() {
* this->data = 0;
* this->next = NULL;
* }
* Node(int data) {
... | ALGO | 0.999965 | 5.27306 |
c7d8961d-68e0-409d-b073-9e11ae819b4e | createamind/a3c333 | PycharmProjects/autodriver/car-simulator/torcs-1.3.6/src/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp | #ifdef _MSC_VER
#pragma warning(disable:4786) // identifier was truncated to '255'
#endif // _MSC_VER
#include "Endpoint.h"
#include "Object.h"
#include "Encounter.h"
#include <new>
void addPair(ObjectPtr object1, ObjectPtr object2);
void removePair(ObjectPtr object1, ObjectPtr object2);
class EndpointList {
public... | ALGO | 0.946532 | 5.521945 |
054535e9-d0aa-4114-9283-6e8ebb1016bd | samoutlier/my-codes-cpp | 12_Queue/10_Petrol_Pump_.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
struct petrolPump
{
int distance, petrol;
};
int Tour(struct petrolPump *&p, int n)
{
int balance = 0, start = 0, deficit = 0;
for (int i = 0; i < n; i++)
{
balance += (p[i].petrol) - p[i].distance;
... | ALGO | 0.999908 | 5.28896 |
8821a4ff-88c8-43ca-bd38-d4b2147e053f | otratsiuk/training | exceptions/queue.cpp | #include "queue.h"
template <class T> void Queue<T>::push_back(T value) {
if (tail < max_size - 1) {
tail++;
array[tail] = value;
} else if (tail == max_size - 1 && head > 0) {
for (int i = head, j = 0; i <= tail; i++, j++) {
array[j] = array[i];
}
tail = max_size - 1 - head;
head = 0... | ALGO | 0.990609 | 5.363227 |
6ac7ac6e-e0a0-42d7-b0cf-f24dc7bec53f | AlunYou/OpenglSamples | AccumulationBuffer/Lib/accjitter.cpp | //
// Name : accjitter.h
// Description : Jittering functions from the OpenGL Red book.
//
#include <stdafx.h>
#include <cmath>
#include "accjitter.h"
GLdouble PI_ = 3.14159265358979323846;
void accFrustrum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top,
GLdouble zNear, GLdoub... | ALGO | 0.99361 | 6.326615 |
1b32c3ad-6bc6-45c6-bec3-42c12cec31a6 | syxm1/competitive-programming | online-judge/eolymp/eolymp-11597.cpp | // Roads and Libraries
/*
menggunakan dsu untuk mengelompokkan kota yang bisa terhubung.
dalam suatu set, pilih cost minimum untuk membangun perpustakaan yang bisa
diakses dari semua anggota set.
*/
#include<cstdio>
#include<vector>
using ll = long long;
struct DSU {
std::vector<int> par, sz;
void init(i... | ALGO | 0.999663 | 4.398916 |
f841dced-b7bf-4f09-aa8b-95475865369c | janavarro95/CPP_Work | Projects/KerneyTextbook/coutDifferentVariableTypes/main.cpp | #include <iostream>
using namespace std;
int main(){
bool x = true;
bool y = false;
if(x && y)
cout << "X and Y are true!\n";
if(x || y)
cout << "X and/or Y is true!\n";
if(x != y)
cout << "X or Y is true!\n";
}
| TOOL | 0.945402 | 3.159702 |
f6c34d60-a023-42fb-97e4-e3457489d219 | HekpoMaH/Olimpiads | grupa C/esenen turnir/2010/B/B/B2-Competition/tests/competition1.cpp | #include <cstdio>
const int maxrunners=10000; // maximum number of runners
const int maxlaps=1000; // maximum number of laps
int s[maxrunners+1];
int p[maxrunners+1];
const int heapsize=1<<14;
struct he // heap element structure
{
int r; ... | ALGO | 0.999943 | 3.185243 |
56b75ced-0513-4fe1-8077-7197268a919c | LittleYang0531/CQ-CSP-S-2021 | CQ-00149/airport/airport.cpp | #include<bits/stdc++.h>
using namespace std;
int n,m1,m2;
const int N=1e5+10;
struct node{
int arr,lef;
//arrive and left
}c[N],f[N];
int cnt;
bool visc[N],visf[N];
int ans=-0x3f3f3f3f;
struct node2{
int time;
int event;//1=arrive,2=left
int CF;//1=ڣ2=
int plane;
}timeC[N];
bool cmp(node a,node b){
return a.... | ALGO | 0.999833 | 3.696993 |
c96484a3-7efa-4dc4-b468-8566900b2108 | ishandutta2007/codeforces | aidos/normal/270/C.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
int main () {
int n;
long k, z, t=0, m[33];
pair <long, long> p[100010];
cin >> n;
for(int i=0; i<n; i++){
scanf("%ld%ld", &k, &z);
long long l=1;
int c=0;
whil... | ALGO | 0.999648 | 3.515188 |
2d7bab0c-0bca-4241-9686-02b62f3f8ca5 | nju-websoft/GSTP-ManyGroups | src/VLSI_upperbound/gen.cpp | #include<bits/stdc++.h>
#define maxn 100005
using namespace std;
int n,g;
int get(int x)
{
return rand()%x+1;
}
pair<int,int> a[maxn];
vector<int> grp[maxn];
int main()
{
scanf("%d%d",&n,&g);
srand(time(NULL));
for(int i=1;i<=n;++i)
{
int x=get(100000),y=get(100000);
a[i]=make_pair(x,y);
}
sort(a+1,a+n+1);
... | ALGO | 0.999246 | 3.468776 |
62a2d822-2556-40e2-a6e8-c820ef76221d | Dhirajpt1234/DSA_CPP | Strings/3anagram.cpp | #include <bits/stdc++.h>
using namespace std;
bool anagram(string a, string b)
{
if (a.length() != b.length())
{
return false;
}
else
{
int ans[128] = {0};
int len = a.length();
for (int i = 0; i < len; i++)
{
ans[int(a[i])]++;
}
... | ALGO | 0.999988 | 4.051346 |
171c3623-af94-4792-8c0b-764aaf6dc1af | ksw01522/SkillTree_Module_For_UE5 | Source/SkillTreeEditor/private/AutoLayout/ForceDirectedLayoutStrategy.cpp | #include "AutoLayout/ForceDirectedLayoutStrategy.h"
static inline float CoolDown(float Temp, float CoolDownRate)
{
if (Temp < .01) return .01;
return Temp - (Temp / CoolDownRate);
}
static inline float GetAttractForce(float X, float K)
{
return (X * X) / K;
}
static inline float GetRepulseForce(float X, float k)
... | ALGO | 0.994488 | 5.761565 |
19225174-4ccc-41d6-bbf5-c2b7a46dcad7 | Kumkw4t/AoC | day14.cpp | #include <vector>
#include <array>
#include <queue>
#include <tuple>
#include <array>
#include <unordered_map>
#include <string>
#include <fstream>
#include <iostream>
#include <chrono>
#include <algorithm>
struct Point {
Point(int mx, int my):
x(mx),
y(my)
{};
int x;
int y;
};
bool ... | ALGO | 0.999201 | 4.536718 |
a1251c16-0128-40cc-be2c-be1f36011ce8 | jinchengXie99/algorithm | 2000.cpp | /*************************************************************************
> File Name: 2000.cpp
> Author: Chengxing
> Mail: <EMAIL>
> Created Time: 五 3/18 22:14:49 2022
************************************************************************/
#include<iostream>
using namespace std;
int main () {
int n;
cin >... | ALGO | 0.997727 | 3.548862 |
1184bcb2-e75b-478a-9e45-76a6a852a96e | javiergn91/C_Memoria2014 | relation2D.cpp | #include "relation2D.h"
#include "math.h"
#include "quadcode.h"
#include "utils.h"
#include <map>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
bool orderPoints(Point p1, Point p2)
{
if(p1.y == p2.y)
{
return p1.x < p2.x;
}
return p1.y < p2.y;
}
Relatio... | DATA | 0.916756 | 4.324365 |
dddae48b-910b-4a33-af15-3325bca2c4e0 | suee97/algorithm | algorithm/CPP/15688.cpp | #include <bits/stdc++.h>
using namespace std;
int arr[1000000];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
sort(arr, arr+n);
for (int i = 0; i < n; i++) {
cout << arr[i] << '\n';
}
} | ALGO | 0.999921 | 4.708347 |
6f3bb346-497d-49bf-9e37-5400708f88c6 | sanyagoyal2000/leetcode | 0139-word-break/0139-word-break.cpp | class Solution {
public:
bool solve(string A,unordered_set<string>&B,int i,vector<int>&dp){
if(i >= A.size()){
return true;
}
if(dp[i]!=-1){
return dp[i];
}
string curr = "";
for(int j=i;j<A.size();j++){
curr+=A[j];
if(B.find(curr)!=B.end()){ ... | ALGO | 0.999871 | 6.067234 |
acb2a948-5cd3-41ac-9b3b-7618e2804c73 | ishandutta2007/codeforces | igori/normal/1174/D.cpp |
#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <time.h>
#include <complex>
using std::cin;
using std::cout;
using std::cerr;
using std::endl;
... | ALGO | 0.999936 | 3.66541 |
9be01699-f7f2-4ef0-bd93-194851e71ef9 | wnsgk/algorithm | string/manacher.cpp | #include <bits/stdc++.h>
#define MAX_N 200002
using namespace std;
int pal[MAX_N];
void manacher(string str){
string s;
for(int i = 0; i < str.length(); i++){
s += '#';
s += str[i];
}
s += '#';
int n = s.length(), r = 0, p = 0;
for(int i = 0; i < n; i++){
if(i <= r... | ALGO | 0.999786 | 4.70099 |
00c7e358-f329-4b9e-9f62-222d44c82661 | paramsingh/cp | src/hourrank/counter.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long lli;
int main(void) {
lli t;
scanf("%lld", &t);
int lo = 1, hi = 50;
while (lo < hi) {
int mid = (lo + hi) / 2;
lli t1 = 3 * ((1LL << mid) - 1);
if (t1 < t)
lo = mid + 1;
else
hi = mi... | ALGO | 0.999886 | 3.898264 |
6993018f-60b2-4be2-8d4c-3185523c1592 | abhishek18124/PPCPPOct2023 | Lecture 28/002RatInAMaze_CountPaths2.cpp | /*
Given a m x n maze with some blocked cells (marked with 'X'), and rat that wants to
go from the src (0, 0) to the dst (m-1, n-1) design a recursive algorithm to
> check if there exists a path from src to dst
such at each step the rat can only move in the right or down direction.
Constraint
1 <= m, n < 10
Exa... | ALGO | 0.999957 | 5.386205 |
ac4ca987-91d9-4648-a511-8b71d93bb7f6 | engrsakib/phitron | XPSC/weekly Task/week 10/day 1/Graph_Cost.cpp | #include <bits/stdc++.h>
#define br "\n"
#define ll long long
#define yes cout << "YES\n"
#define no cout << "NO\n"
using namespace std;
class Solution
{
public:
void solve()
{
ll n, l = 0, r;
cin >> n;
vector<ll> a(n);
for (ll i = 0; i < n; i++)
{
cin >> a[... | ALGO | 0.99997 | 5.251489 |
006b0a1f-4190-493c-b186-bc848eae334a | adritor7/PCA | PCA/PCA/PCA.cpp | #include <fstream>;
#include <cstdio>;
#include <iostream>
#include <cstdlib>
#include <stdlib.h>
#include <mkl.h>
#include <errno.h>
#include "FileManager.h"
using namespace std;
void getEigenVector(double eigenvectors[],double eigenvector[],int column,int numberOfColumn){
int countOfPositions = 0;
for (int i = co... | ALGO | 0.999669 | 3.552868 |
057ae865-8196-4907-ba11-5144855634af | belall0/competitive-programming | Codeforces/800-900/AngryStudents.cpp | /*
* url: https://vjudge.net/solution/59282784/oZNVcrz44m78PaQ6WB79
* date: 17 - 03 - 2025
* category: implementation
* complexity: O(n)
*/
#include <bits/stdc++.h>
using namespace std;
void solution()
{
int t{};
cin >> t;
while (t--)
{
int n{};
cin >> n;
string str{};
cin >> str;
... | ALGO | 0.999585 | 5.038231 |
135db140-5d58-4cb3-9ae8-6df7ca6f92f5 | eeyore114/image-processing | projection/0d_1d_proj/1d_interpolation.cpp | #include <iostream>
using namespace std;
#include <stdio.h>
#include <math.h>
void interpolation_1d(float* f, float* g);
template <typename T> void
readRawFile (const char fname[], const size_t num, T* image);
template <typename T> void
writeRawFile (const char fname[], const size_t num, T* image);
int main()
{
... | ALGO | 0.991147 | 3.318325 |
9f04d2ec-c70c-4866-be8d-81ccabadcee6 | Yusuf-sust/Problem_Solving | uva prb solve/11137 - Ingenuous Cubrency.cpp | #include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<math.h>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
using namesp... | ALGO | 0.999089 | 3.349262 |
088fc89f-4b6a-4962-bf4c-e7f0809acca9 | hamidallaei/SPP | serial/membrane.cpp | #include "../shared/parameters.h"
#include "../shared/c2dvector.h"
#include "../shared/particle.h"
#include "../shared/cell.h"
#include "beadbox.h"
int input_seed;
inline void timing_information(Box* box, clock_t start_time, Real box_initial_time)
{
clock_t current_time = clock();
int lapsed_time = (current_time ... | TOOL | 0.985609 | 4.149023 |
739d4a29-5d49-4bad-bab3-d25219dcfbd5 | dowhiletrue/Qlockwork | TransitionFade.cpp | /**
* TransitionFade.cpp
* Transitionen bei Wechsel Zeitmatrix
*
* @mc Arduino/UNO
* @autor Manuel Bracher / <EMAIL>
* @version 1.0
* @created 19.05.15
*
* Versionshistorie:
* V 1.0: - Erstellt.
*/
#include "TransitionFade.h"
#include "Debug.h"
#define DEBUG
TransitionFade::TransitionFade(LedDr... | TOOL | 0.952007 | 3.953736 |
939497f6-2a95-4e73-a5fc-b7fc0aa32b16 | wesley-stone/leetcode | 126_Word_Ladder2/126_Word_Ladder2/Solution.cpp | #include "Solution.hpp"
#include <queue>
bool checkADJ(string a, string b){
if (a.size() != b.size()){
return false;
}
unsigned long diff = 0;
for (unsigned long i = 0; i < a.size(); i++){
if (a[i] != b[i]){
diff++;
if (diff > 1){
return false;
... | ALGO | 0.999972 | 5.507424 |
bddb5c59-0f29-469c-acdd-2acb5a7b28c9 | yannxin/StringOperation | StringMatch/KMPStrMatch.cpp | #include "stdafx.h"
void SelfStrMatch(const char *pattern, int pre[])
{
if (NULL == pattern)
return;
register int npattern = strlen(pattern);
pre[0] = -1;
int i, j = -1;
for (i = 1; i < npattern; i++)
{
while (j >= 0 && pattern[j+1] != pattern[i])
j = pre[j];
if (pattern[j+1] == pattern[i])
j++;
p... | ALGO | 0.999841 | 4.250958 |
e308770a-dfb4-4674-a886-f721b0f31428 | netbeen/UncleZhou_UI | eigen-eigen-b30b87236a1b/doc/examples/tut_matrix_resize.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
int main()
{
MatrixXd m(2,5);
m.resize(4,3);
std::cout << "The matrix m is of size "
<< m.rows() << "x" << m.cols() << std::endl;
std::cout << "It has " << m.size() << " coefficients" << std::endl;
VectorXd v(2);
v.resize(5);
... | ALGO | 0.959907 | 3.876808 |
038824b0-7841-41e8-956c-e28b86fd4499 | cdepalma141/EE593 | Session1/main2.cpp | //
// Created by Connor DePalma on 9/16/18.
//
#include <iostream>
#include <cmath>
#include <vector>
//0 to 10 mill very quick
//100 mill very quick too
//0 to 1 bill takes minutes not good
using namespace std;
int ES (uint64_t a, uint64_t b) {
int count = 0;
vector<uint8_t > bits;
vector<uint8_t> bits1;... | ALGO | 0.999841 | 4.862833 |
e79e74d0-e281-4094-947e-0eda3aaccad2 | selfcan/padavan-mine | trunk/tools/lzma/lzma-4.65/CPP/Common/CommandLineParser.cpp | // CommandLineParser.cpp
#include "StdAfx.h"
#include "CommandLineParser.h"
namespace NCommandLineParser {
void SplitCommandLine(const UString &src, UString &dest1, UString &dest2)
{
dest1.Empty();
dest2.Empty();
bool quoteMode = false;
int i;
for (i = 0; i < src.Length(); i++)
{
wchar_t c = src[i];... | TOOL | 0.90659 | 5.774717 |
5e921151-9874-4088-bb85-7456db1c2e8e | LRL52/ACM-ICPC | 2022年电子科技大学ACM-ICPC暑假集训(含数学与几何专题)/7.9/B_Haiku.cpp | //ID: LRL52 Date: 2022.7.9
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#define rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define ee(i, a) for(int i = head[a]; i; i = e[i].nxt)
using namespace std;
const int N = 1055, M = 2055; char ss[1 << 21], * A = ss, * B = ss, cc;
inline char gc... | ALGO | 0.999349 | 3.918615 |
569d3700-44c2-439c-9cd8-3a42473d9dac | aryan-rohit/Competitive-Programming | DP-CP/MultiDimensionalDP/MagicalString1.cpp | // Problem Name: Magical String 1
// Problem Difficulty:
// Problem Constraints: 1 <= n <= 1000
// 1 <= a1,a2...a26 <= 1000 (for 26 lowercase numbers)
// Problem Description:
// Secret ravens from Winterfell started flying as the great war was coming.
// The Starks wrote the message using only 26 lowercase letters ('... | ALGO | 0.999976 | 4.571691 |
42523aa0-cff0-4bc3-a05a-bcca7693001f | om2357/oomProgram | CodingNinjaDSA/defaultArgument.cpp | #include <iostream>
using namespace std;
int sum(int a[], int size, int si = 0)
{
int ans = 0;
for (int i = si; i < size; i++)
{
ans += a[i];
}
return ans;
}
int main()
{
int arr[10];
for (int i = 0; i < 10; i++)
{
cin >> arr[i];
}
cout << sum(arr, 10 ,1) << end... | ALGO | 0.997021 | 3.236202 |
060a045b-934a-4657-b126-9ee4ddb62a19 | rizvy99/Problem-Solving | Codeforces/122A.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int count=0;
int s;
cin>>s;
if(s%4==0||s%7==0||s%47==0||s%74==7||s%444==0||s%447==0
||s%474==0||s%477==0||s%777==0||s%744==0||s%747==0||s%774==0){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
... | ALGO | 0.999543 | 3.432412 |
7d72da26-a909-41e6-8234-eae8d21fbda8 | Harshgonnade/Cpp | tut36.cpp | // Ambigutiy resolution in inheritance
#include <iostream>
using namespace std;
// class Base1
// {
// public:
// void greet()
// {
// cout<<" Hello "<<endl;
// }
// };
// class Base2
// {
// public:
// void greet()
// {
// cout<<" Welcome "<<endl;
// }
// };
// class ... | TOOL | 0.876416 | 5.334851 |
a3ff398e-8f5a-43b5-9d0a-2c80c7726728 | bonavadeur/HP-Data-Structure | SortAlgorithm.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <fstream>
#include <random>
#include <chrono>
#include "SortAlgorithm.h"
using namespace std;
void swap(struct input &xp, struct input &yp) {
struct input temp = xp;
xp = yp;
yp = temp;
}
void swap2(struct input* a, s... | ALGO | 0.998993 | 4.595928 |
a9a515d0-5260-4758-be52-ca89ff7708a6 | ishandutta2007/codeforces | ei133333/normal/512/A.cpp | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
const int mod = 1e9 + 7;
// const int mod = 998244353;
const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
struct IoSetup {
IoSetup() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10... | ALGO | 0.999996 | 4.819177 |
277a4042-0e00-4e22-bf67-6e90f1313142 | aospcus/android_frameworks_av | media/libstagefright/codecs/amrnb/dec/src/preemph.cpp | /*
------------------------------------------------------------------------------
Pathname: ./audio/gsm-amr/c/src/preemph.c
Functions:
Date: 02/04/2002
------------------------------------------------------------------------------
REVISION HISTORY
Description: Removed the functions preemphasis_init and pre... | ALGO | 0.999083 | 6.637343 |
397d4e87-eaf1-4df0-8d0e-3ed585adc147 | ishandutta2007/codeforces | bleddest/normal/27/D.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int v, n;
cin >> v >> n;
vector<int> l(n), r(n);
for(int i = 0; i < n; i++)
cin >> l[i] >> r[i];
vector<vector<int>> g(n);
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++)
{
set<int> s = {l[i], ... | ALGO | 0.999974 | 3.459959 |
2ef77e49-1a1b-4128-9f55-02bcf4a0bbd8 | Harshsukhija24/dsa | mountblu/string/binarysubstring.cpp | #include <iostream>
#include <string>
using namespace std;
int countBinarySubstrings(const string& s) {
int n = s.size();
int count = 0;
int previousLength = 0; // Length of the previous segment of the opposite character
int currentLength = 1; // Length of the current segment of the same character
... | ALGO | 0.999977 | 7.194731 |
089d94b5-db30-45ab-b8ab-21e0415848c4 | neelotpal-d/VectorField_Multiaxis | ThirdPartyDependence/libigl/tutorial/110_MshView/main.cpp | #include <igl/opengl/glfw/Viewer.h>
#include <igl/barycenter.h>
#include <igl/colormap.h>
#include <igl/readMSH.h>
#include <igl/readMESH.h>
Eigen::MatrixXd X,B;
Eigen::MatrixXi Tri;
Eigen::MatrixXi Tet;
Eigen::VectorXi TriTag;
Eigen::VectorXi TetTag;
Eigen::VectorXd D;
std::vector<std::string> XFields;
std::vector... | ALGO | 0.891619 | 5.203537 |
24689fe5-da78-4ec1-93be-601433c88173 | RenoirTan/dunjudge.me | lunchbox954/lunchbox.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int lunchboxes, schools;
cin >> lunchboxes >> schools;
priority_queue<int, vector<int>, greater<int>> requests;
int request;
for (int i = 0; i < schools; i++)
{
cin >> request;
requests.push(request);
};
int serv... | ALGO | 0.999899 | 3.558664 |
937cdec0-ff89-4750-b613-852812160640 | MariaChrysafis/CompetitiveProgramming | Codeforces/1202C.cpp | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <vector>
#define ll long long
using namespace std;
ll eval(string s) {
ll p... | ALGO | 0.999781 | 5.29719 |
a7a83c23-04b1-4a21-922d-ed9a89ceed6b | KharbandaBhavy/UPES-Semester-2 | Data Structures Programs/Program13.cpp | // Code by Bhavy Kharbanda
// Experiment-13: Implement a hash function on student SAP-ID and categorize them in to their 10 families based on the last three digits.
// Example: Student with SAP-ID 5000423 belongs to family 9 and student with SAP-ID 5000425 belongs to family 2 based on last three digits.
#include<stdi... | ALGO | 0.999441 | 4.400785 |
6f6f06e9-f8c7-416c-b0ba-18edc903e69b | ViniGenesini/Projetos_Algoritmos | Algoritmos - Atividade Notas (Do While).cpp | #include<stdio.h>
#include<stdlib.h>
#include<locale.h>
main(){
setlocale(LC_ALL, "portuguese");
int i=0;
float media, nota[4], soma=0;
printf("\n NOTAS BIMESTRAIS");
do{
printf("\n Informe a Nota do %d bimestre: ",i+1);
scanf("%f",¬a[i]);
i++;
}while(i<4);
i=0;
do{
soma = soma + nota[i];
i++;
}wh... | TOOL | 0.998147 | 3.350993 |
71903293-8fb4-42bd-bef1-34eb32cab0b8 | uv-goswami/Cpp | Practicals/04_menu_driven_prgm.cpp | #include<iostream>
#include<cstring>
using namespace std;
void showAddress(const char* str, const char* varName);
void concatenate(char* str1, const char* str2);
int compare(const char* str1, const char* str2);
int length(const char* str);
void uppercase(char* str);
void reverse(char* str);
void insert(char* str1, con... | TOOL | 0.987696 | 4.013949 |
224631d7-0c45-4455-8c1c-20433aa948f6 | gandhi56/Competitive-Programming | codeforces/1348/a/a.cpp | #define LIN cout << __LINE__ << endl;
#define INF 0x3f3f3f3f
#include <bits/stdc++.h>
using namespace std;
#define max3(a, b, c) max(a, max(b, c))
#define min3(a, b, c) min(a, min(b, c))
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x... | ALGO | 0.999728 | 4.269742 |
07b218fb-9916-43bf-a066-1979627ebf79 | KAISER1997/REBELLION-1 | 414B.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int > arr[9999];
int valuew[2222]={0};
int k;
void DFS(int start,int x)
{
valuew[x]+=1;
for(int r=0;r<arr[start].size();r++)
DFS(arr[start][r],x+1);
}
long long int store[2002][2002]={0};
long long int ncrModp( long long int n, long long int r, long long int p)
... | ALGO | 0.999957 | 3.978172 |
c9851fb3-d60a-49b3-9ab8-b91eacf32735 | seongwon980/cpp.algorithms | Algorithms/14002.cpp | #include <iostream>
using namespace std;
const int MAX_N = 1000;
int arr[MAX_N];
int dp[MAX_N];
int link[MAX_N];
int result[MAX_N];
int main(void) {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
// Dynamic programming 조건을 만족시킨다.
// dp[i] : 'i번째 index의 element를 마지막으로 선택했을 때,
// ... | ALGO | 0.999999 | 4.667678 |
f6afbf79-fc0e-436c-853f-7d0f848ecc19 | utkarsh2338/LEETCODE | 0003-longest-substring-without-repeating-characters/0003-longest-substring-without-repeating-characters.cpp | class Solution {
public:
int lengthOfLongestSubstring(string s) {
int i =0,j=0;
int n = s.length();
int ans = 0;
vector<int>charCount(256,0);// count store karne ke liye
while(j<n){
charCount[s[j]]++;// state ko update karne ki condition
// ab yaha pa... | ALGO | 0.999972 | 5.857153 |
4a3455e1-ff6a-4be6-8824-8a2ec57e395d | johncanero/flutter_grocery_shop_app | 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.998784 | 6.761023 |
21b57952-89ca-4143-9b3e-4e7a5b2fb733 | pphamducminh/A_thuattoan | DP/DP SOS/PuzzleAboutMagicalQuadruples.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <string>
#include <queue>
#include <cctype>
#include <cstring>
#include <iomanip>
#include <deque>
#include <rand... | ALGO | 0.999987 | 3.760314 |
317c378d-6d6b-409c-b381-9545804c4b00 | IkramBagban/Data-Structures-And-Algorithm | Supreme 2.0/18-LinkedLists/Lecture-1/3-createLinkedList.cpp | // Author: Ikram Bagban
// Email: <EMAIL>
// GitHub: https://github.com/ikrambagban
#include <iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
// Default constructor initializes 'next' to ensure it doesn't have a garbage value
Node()
{
cout << "In Default Construc... | ALGO | 0.998246 | 6.275992 |
85f166fc-e898-4b13-9658-f34a2b3860ab | raincross7/code-similarity | codes/train_code/problem242/problem242_138.cpp | #include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define... | ALGO | 0.999951 | 3.041729 |
a393eee9-2992-4c40-a8ef-f5c19f04020d | Muhammad-Sharif-Ullah/food_delivery | 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.998667 | 6.789978 |
0aa12ded-7d94-48d8-8d6b-0b88dcc18275 | sumanadhikari0625/Leetcode-Solutions | 2032-largest-odd-number-in-string/2032-largest-odd-number-in-string.cpp | class Solution {
public:
string largestOddNumber(string num) {
int n=num.length();
for(int i=n-1;i>=0;i--)
{
if((int)(num[i]-48)%2!=0)
{
return num.substr(0,i+1);
}
}
return "";
}
}; | ALGO | 0.999946 | 6.046637 |
be4871ee-0dbf-4f87-ad89-a2c3147ec4e3 | wwestrop/blender | extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp | #include "btConvexConcaveCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionShapes/btConcaveShape.h"
#include "BulletC... | ALGO | 0.999361 | 7.204129 |
23258d4e-9a0a-4d08-acc3-4b7dcb18853e | 25shivammittal02/C-Practice | decoding messages.cpp | //https://practice.geeksforgeeks.org/problems/total-decoding-messages/0
#include <bits/stdc++.h>
using namespace std;
int fun(int *ar,int pos,int len)
{
if(pos==len)
return 1;
if(ar[pos]==0)
return 0;
int op1=fun(ar,pos+1,len);
int op2=0;
if((pos<=len-2) and (((10*ar[pos])+ar[pos+1])<27... | ALGO | 0.99939 | 4.33677 |
b5fee5dd-e91a-4ca7-a8b1-8ec4b47524f8 | shozabhussain/CS200 | Lab 2/Task_1.cpp | #include <iostream>
using namespace std;
struct date{
int month, day, year;
point(){
int month=0;
int day=0;
int year=0;
}
};
void printdate(date a){
cout << a.year << "-"<< a.month << "-" << a.day << endl;
}
date adddate(date a, date b){
date c;
c.day= a.day+ b.day;
c.month = a.month + b.month;
c... | ALGO | 0.955779 | 3.887839 |
d6ebd09f-64fc-40a0-8f6b-2e5f3d033f6e | viktorMirev/Personal-Projects | BracketChecker/BracketChecker/Source.cpp | /**
*
* Solution to homework task
* Introduction to programming course
* Faculty of Mathematics and Informatics of Sofia University
* Winter semester 2017/2018
*
* @author Viktor Mirev
* @idnumber 62231
* @task 1
* @compiler VC
*
*/
#include<iostream>
using namespace std;
//no way to use something different than this... | ALGO | 0.999557 | 4.492024 |
6f84981c-743d-49a3-9179-34464cc54d0d | deepak2k03/DSA | 15_Graphs/21_Course_Schedule_II.cpp | class Solution {
public:
vector<int> findOrder(int V, vector<vector<int>>& edges) {
queue<int>q;
vector<int>adj[V];
for (auto& edge : edges) {
int u = edge[1], v = edge[0];
adj[u].push_back(v);
}
vector<int>indegree(V);
for(int u=0;u<V;u++) for... | ALGO | 0.999994 | 6.312204 |
e91a5bca-4ca5-4827-beda-7b1ad0244f94 | horswing/3d-workspace | MathLibrary/Deformer/ARAPDeformer.cpp | #include "ARAPDeformer.h"
ARAPDeformer::ARAPDeformer(Surface_mesh * usingMesh)
{
this->mesh = usingMesh;
// Frequently used
nVerts = mesh->n_vertices();
vend = mesh->vertices_end();
points = mesh->vertex_property<Point>("v:point");
normals = mesh->vertex_property<Normal>("v:normal");
isAnchorPoint = mesh->vert... | ALGO | 0.997617 | 4.75277 |
3033ab7a-c0a5-42d8-bdb7-1bacff4dc886 | albusshin/leetcode | 136. Single Number/136. Single Number/Source.cpp | class Solution {
public:
int singleNumber(int A[], int n) {
int ret = 0;
for (int i = 0; i < n; i++) ret ^= A[i];
return ret;
}
}; | ALGO | 0.999801 | 5.39123 |
67a4668f-5615-47d6-89e0-a7f60af47c2d | manoharnaga/leetcode | 0962-maximum-width-ramp/0962-maximum-width-ramp.cpp | class Solution {
public:
int maxWidthRamp(vector<int>& b) {
int n = b.size();
vector<pair<int,int>> c;
for(int i=1;i<=n;i++){
c.push_back({b[i-1],i});
}
sort(c.begin(),c.end());
vector<int> v(n,INT_MIN);
int ans = 0;
v[n-1] = c[n-1].second;... | ALGO | 0.999937 | 5.714215 |
d2a22986-3153-4a33-8340-a04e7dd07c5a | lightning-sagar/100th_days_of_DSA | LINKLIST/day6/swap_node.cpp | #include<iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
Node() {
this->data = 0;
this->next = NULL;
}
Node(int data) {
this->data = data;
this->next = NULL;
}
};
void prints(Node* head) {
Node* temp = head;
while(temp != NULL)... | ALGO | 0.999983 | 4.582213 |
78527a88-5362-49c9-81d3-395e102af603 | alexvelea/lot-info-2018-2 | sortall/tamio_foarte_optimizat_nlog2.cpp | #include <iostream>
#include <cassert>
#include <fstream>
#include <vector>
using namespace std;
constexpr int mod = 1e9 + 7;
using ll = long long;
long long brut(vector<int> v){
long long rez = 0;
for(int i = 0; i < v.size(); ++i){
for(int j = i+1; j <= v.size(); ++j){
vector<int> vv(begi... | ALGO | 0.999865 | 4.069214 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.