uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
f8c94c0e-024b-4b65-b561-156926c4435a | airsim/travelccm | travelccm/bom/HybridModel.cpp | // //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
// STL
#include <cassert>
#include <sstream>
// StdAir
#include <stdair/bom/BomKeyManager.hpp>
#include <stdair/bom/BookingClassKey.hpp>
#include <stdair/... | ALGO | 0.995651 | 6.395829 |
ace92667-e3e7-46a6-b041-691f448b5b0e | Jubayer934/CPP-Basic-Problem | Contest_1/N. Char.cpp | #include<iostream>
#include<ctype.h>
using namespace std;
int main()
{
char x;
cin>>x;
if(x>=65 && x<97)
cout<<char(tolower(x))<<endl;
else
cout<<char(toupper(x))<<endl;
} | ALGO | 0.951215 | 4.472738 |
3a9b293e-fde2-40ec-a498-5819b64135b4 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_4002_28.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int b = 0;
string a;
cin >> a;
if (a.size() >= 5) b++;
for (int i = 0; i < a.size(); i++) {
if (int(a[i]) >= 97 and int(a[i]) <= 122) {
b++;
break;
}
}
for (int i = 0; i < a.size(); i++) {
if (int(a[i]) >= 48 and int(a[i]) ... | ALGO | 0.999085 | 3.387335 |
ead1ee97-c281-4bd3-ac9e-c45616cc487c | virajchandra51/TLE_CP_31 | 1200/02 - Make Almost Equal With Mod.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--) { //? (O(t * (N log N)))
int n;
cin>>n;
long long arr[n];
for(int i = 0; i < n; i++) cin>>arr[i]; //? O(N)
long long ans = 0;
for(int i = 1; i <= 60; i++) { //! 2^1 -> ... | ALGO | 0.999362 | 5.088432 |
048e4160-bd6c-4c1a-84ca-2dc5084aca12 | GooglerAdarsh/Algorithms_Googler_adarsh | Catalan_number.cpp | #include<bits/stdc++.h>
using namespace std;
int fact(int n){
if(n==1)
return n;
else
{
return (n*fact(n-1));
}
}
int castal_number(int n){
int m=fact(n);
int u=fact(2*n);
int l=fact((n+1));
l=(int)(u/l);
return((int)(l/m));
}
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cou... | ALGO | 0.999945 | 4.594745 |
a0c448da-b8aa-4cf3-87f4-96bb18283a82 | Mr-RajniX/Get-Back-To-DSA | Cpp/GFG-School/6-Pattern-Print01.cpp | void printPat(int n)
{
// Your code here
for (int row = n; row > 0; row--)
{
int val = n, count = 0;
for (int col = 0; col < (row * n); col++)
{
count++;
if (count > row)
{
val--;
count = 1;
}
... | ALGO | 0.999537 | 3.696621 |
b81dcbf9-3e16-4de6-8b97-9cf92a914a71 | raincross7/code-similarity | codes/train_code/problem418/problem418_78.cpp | #include<iostream>
#include<stdio.h>
#include<cstring>
#include<cmath>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<unordered_map>
#include<bits/stdc++.h>
#define ll long long
#define dd double
using namespace std;
const ll MOD = 1e9 + 7;
int main()
{
ios_base::sync_with_stdio(false);... | ALGO | 0.999931 | 3.097254 |
28eb5dd9-2c24-45f0-86bd-0068dc568364 | Sushma-2004-dot/daa_portfolio | Kruskal's Algorithm.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Edge {
public:
int src, dest, weight;
Edge(int s, int d, int w) : src(s), dest(d), weight(w) {}
};
bool compare(Edge e1, Edge e2) {
return e1.weight < e2.weight;
}
int findParent(int parent[], int i) {
if (parent[i]... | ALGO | 0.999975 | 5.446715 |
31713d37-7c6e-4858-8f02-859d786b694f | ilev-sergey/cpp_labs | 1st_semester/Task1/Problem3.cpp | #include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
double a = 0.0, b = 0.0, c = 0.0; // ax^2 + bx + c = 0
cout << "Введите a: ";
cin >> a;
cout << "Введите b: ";
cin >> b;
cout << "Введите c: ";
cin >> c;
double x1 = 0.0, x2 = 0.0;
if (a == 0.0)
{... | ALGO | 0.99557 | 3.10491 |
81602da5-ea78-4dd9-b143-222314f68674 | Nehagaddam2909/DSAsheet | day6/JumpGame1.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
bool canJump(vector<int>& nums) {
int n=nums.size();
int goal=n-1;
for(int i=n-2;i>=0;i--){
if(nums[i]+i>=goal)goal=i;
}
if(goal!=0) return false;
return true;
}
};
int main()
{
... | ALGO | 0.999962 | 4.555464 |
6912acea-f206-474c-b9b1-92a098541ea7 | cxxxin/LeetCode | 523.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
/*
连续的子数组和
给你一个整数数组 nums 和一个整数 k ,编写一个函数来判断该数组是否含有同时满足下述条件的连续子数组:
子数组大小 至少为 2 ,且
子数组元素总和为 k 的倍数。
如果存在,返回 true ;否则,返回 false 。
如果存在一个整数 n ,令整数 x 符合 x = n * k ,则称 x 是 k 的一个倍数。0 始终视为 k 的一个倍数。
*/
/*
思路:
sum[i][j] = sum[0][j] - sum[0... | ALGO | 0.999825 | 5.154617 |
b704c9d6-38fa-4939-a4d7-aee080c25018 | KraitOPP/Codeforces | C_Sofia_and_the_Lost_Operations.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define loop(i, a, b) for(int i=a;i<b;i++)
signed main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while (t--) {
auto begin = chrono::high_resolution_clock::now();
int n, m;... | ALGO | 0.999957 | 4.469849 |
8c472536-76df-45a8-8fcf-1f962c8bdd86 | Leepo1/CompetitiveProgramming | DataStructuresandAlgorithms/UCFSegmentTree.cpp | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define INF 2000000000
using namespace std;
using ll = ... | ALGO | 0.999881 | 4.267272 |
50892433-6bd8-4411-b7bd-ea20e38b445c | pranavajith/CP-Practice | CP (Until Creation of Repo)/CPH/B_Nastia_and_a_Good_Array.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <set>
#include <cmath>
#include <map>
#include <sstream>
#include <deque>
#include <algorithm>
#include <limits>
#include <iomanip>
using namespace std;
#define ll long long
// #define TxtIO freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); freopen... | ALGO | 0.999001 | 3.403355 |
c443a081-3a50-453d-b0f7-871046aabda7 | raincross7/code-similarity | codes/train_code/problem373/problem373_103.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vs = vector<string>;
typedef pair<ll, ll> P;
#define bit(n) (1LL << (n))
//#define int long l... | ALGO | 0.999981 | 4.256419 |
926f57ed-1eeb-4e43-aaea-dc1368cb95e7 | sachit288/AI-LAB | BeamSearch_Op.cpp | #include <bits/stdc++.h>
using namespace std;
void beam_op(vector<vector<int>> &mtx, int s, int n, vector<int> &vi, int w)
{
queue<int> open;
open.push(s);
vi[s] = 1;
while (open.empty() != 1)
{
int a = open.front();
int x = 0;
for (int i = 0; i < n; i++)
{
... | ALGO | 0.999993 | 4.169221 |
2e090e45-c9dd-423f-8cc9-1cb3851eaf50 | nrfconnect/sdk-connectedhomeip | src/lib/dnssd/IPAddressSorter.cpp | #include <lib/dnssd/IPAddressSorter.h>
#include <lib/support/SortUtils.h>
namespace chip {
namespace Dnssd {
namespace IPAddressSorter {
void Sort(Inet::IPAddress * addresses, size_t count, Inet::InterfaceId interfaceId)
{
Sorting::InsertionSort(addresses, count, [interfaceId](const Inet::IPAddress & a, const Ine... | TOOL | 0.989427 | 7.702403 |
28df0570-c438-4638-8d5e-b9c79116d8f8 | IMLV1/Algorithm_ProgrammingSkill | grading.cpp | #include <iostream>
using namespace std;
int main() {
int input;
int sum = 0;
while (cin >> input) sum += input;
if (sum < 50) {
cout << 'F';
} else if (sum < 55) {
cout << 'D';
} else if (sum < 60) {
cout << "D+";
} else if (sum < 65) {
cout << 'C';
... | ALGO | 0.996892 | 4.060977 |
f90d1fe2-d376-4e18-9142-452cf6d76529 | BowDer1118/ContestSolution | LeetCode/MinStack.cpp | #include <bits/stdc++.h>
using namespace std;
class MinStack {
public:
deque<int> d;
multiset<int> s;
MinStack() {
d.clear();
}
void push(int val) {
d.push_back(val);
s.insert(val);
}
void pop() {
auto it = s.find(d.back());
s.erase(it);
d.p... | ALGO | 0.999944 | 6.13579 |
effb5491-6a6b-4b48-a0c6-d53b15d889a5 | Heuope/WinApiPhonebook | TelephonyUI/Source.cpp | #pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='<IP_ADDRESS>' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include <Windows.h>
#include <windowsx.h>
#include <string>
#include <vector>
#include <mbstring.h>
#include <stdli... | TOOL | 0.967109 | 4.918296 |
c63e6bf1-fdbd-4926-ac06-cdc87a632858 | ibrkhalil/ds-algo-dojo | time-conversion.cpp | #include <iostream>
using namespace std;
int main () {
string s;
cin >> s;
string leftStr;
string result;
bool lessThanOne = false;
int left = s[0] - '0';
if(left == 0)
lessThanOne = true;
int len = s.size();
char PMorAM = s[len-2];
if(PMorAM == 'P')
{
if(s[... | ALGO | 0.999098 | 4.103862 |
a191fdd2-9fb3-417a-a903-9a09a688b0d8 | cbiello/twoloop_ppbbhLC | ampbbqqH/ysubsqq2Lnf0pppn/Yqq2Lnf0pppn89.cpp | #include <iostream>
#include "listYqq2Lnf0pppn.h"
#include <complex>
#include <qd/qd_real.h>
std::complex<dd_real> Yqq2Lnf0pppn89(ExVariables ex){
std::complex<dd_real> ex1=ex.ex1;
std::complex<dd_real> ex2=ex.ex2;
std::complex<dd_real> ex3=ex.ex3;
std::complex<dd_real> ex4=ex.ex4;
std::complex<dd_real> ex5=ex.ex5;
st... | ALGO | 0.851964 | 3.124248 |
f78b2d39-54ea-4848-8055-4b10bce99553 | openkylin/android-platform-frameworks-base | media/jni/android_media_MediaCodecList.cpp | //#define LOG_NDEBUG 0
#define LOG_TAG "MediaCodec-JNI"
#include <utils/Log.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/MediaCodecList.h>
#include <media/IMediaCodecList.h>
#include <media/MediaCodecInfo.h>
#include <utils/Vector.h... | TOOL | 0.883566 | 7.318512 |
f96947e3-e5d6-443e-a93f-0f282f571e7e | KAU-BOJ-Study/BOJ-PROB | 2020.01.02/1260_YJ.cpp | #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring> //memset
using namespace std;
vector<int> a[1001]; //인접리스트
int check[1001] = {0,};
//깊이 우선 탐색 -> 스택을 이용
void dfs(int x){
check[x] = 1; //방문 했음
printf("%d ", x);
for(int i =... | ALGO | 0.999988 | 4.160553 |
d53557f9-e6a8-40d6-a24b-3b696d9c3a86 | WeslySloan/C-Plus-Plus-Lecture3 | Program/Class6th (Two Pointer)/Source.cpp | #include <iostream>
using namespace std;
#define SIZE 5
int main()
{
#pragma region 투 포인터
// 두 개의 포인터를 활용해서 배열의 요소를 효과적으로
// 탐색하는 알고리즘입니다.
// 1. 시작점과 끝나는 지점이 첫번째 원소를 가리키도록 합니다.
// 2. 현재 부분합이 m과 같다면 count를 증가시킵니다.
// 3. 현재 부분합이 m보다 작다면 end를 1 증가시킵니다.
// 4. 현재 부분합이 m보다 크거나 같다면 start를 1 증가시킵... | ALGO | 0.999898 | 5.363435 |
ea75ffb0-ab1e-4fad-866a-be951d0f0f14 | trailofbits/llvm-sanitizer-tutorial | llvm/lib/Analysis/CaptureTracking.cpp | #include "llvm/Analysis/CaptureTracking.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/OrderedBasicBlock.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Domin... | TOOL | 0.880687 | 7.796298 |
0de26b68-4f9b-404e-a5a5-5b3ff65a7f0a | Saleh7127/CPP-solution-by-Fellow_junior | Spoj Judge/spoj smpsum.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
ll a,b,c=0,i,j,k;
cin>>a>>b;
for(i=a;i<=b;i++)
{
c+=(i*i);
}
cout<<c<<endl;
return 0;
}
| ALGO | 0.999283 | 4.557785 |
0fcc6ffb-f2ea-4039-a2a3-5db4586d9b46 | AKUSAYANGORANGTUAKU/Roy | LeetCode Contests/LeetCode Contest #152/#1175 Prime Arrangements/Sieve.cpp | class Solution
{
public:
int numPrimeArrangements(int n);
};
int Solution :: numPrimeArrangements(int n)
{
vector<bool> prime(n + 1, true);
prime[0] = false;
prime[1] = false;
for(int i = 2; i <= sqrt(n); i++)
{
if(prime[i])
for(int factor = 2; factor*i <= n; factor++)
... | ALGO | 0.999977 | 6.072206 |
e25082c2-9c58-438a-9d84-7feb0a717e24 | raincross7/code-similarity | codes/train_code/problem451/problem451_70.cpp | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
# define M_PI 3.14159265358979323846
const int M=1e9+7;
long long mod(long long x){
return ((x%M + M)%M);
}
long long add(long long a, long long b){
... | ALGO | 0.999926 | 3.893219 |
ed37f7e5-fada-48f9-b646-b33f7db394bc | MilenkovskiTrajche/OOP | ZadaciZaVezbanjeZaPrvKolokvium/7.cpp | //
// Created by milen on 24/03/2024.
//
#include<iostream>
#include <iomanip>
#include <limits.h>
using namespace std;
struct Vozenje{
char ime[100];
int min;
float cena;
bool popust;
void print(){
cout<<ime<<" "<<min<<" ";
if (cena == static_cast<int>(cena)) { //cena-cena==0 pri... | ALGO | 0.986405 | 4.793409 |
f27af454-7456-4185-b195-649f01d8b3b1 | koralkulacoglu/CompetitiveProgramming | CCC/2014/S3.cpp | /*
ID: Koral Kulacoglu
TASK: test
LANG: C++
*/
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef long double lld;
typedef complex<ld> cd;
typedef pair<int, ... | ALGO | 0.999937 | 4.254294 |
9352146e-dce3-4166-997b-d787ced73a33 | sudiptarathi2020/Problem-Solves | lightoj/Aladdin_and_the_Flying_Carpet.cpp |
#include<bits/stdc++.h>
using namespace std;
const long long sz=1e6+100;
vector<long long>v;
void sieve()
{
bool arr[sz+10];
memset(arr,true,sizeof(arr));
arr[0]=arr[1]=false;
for(long long i=2;i*i<=sz;i++)
{
if(arr[i])
{
for(long long j=i*i;j<=sz;j+=i)
{
... | ALGO | 0.999509 | 4.484714 |
b7252850-ae2d-4ec0-b171-e40d3a33b2bd | satish-kumar75/DSA | Queue/llimpQueue.cpp | #include<bits/stdc++.h>
using namespace std;
template< typename T>
class node{
public:
T data;
node<T>* next;
public:
node(T da){
data=da;
next=NULL;
}
};
template <typename T>
class llQueue{
node<T>* front;
node<T>* rear;
public:
... | ALGO | 0.999361 | 3.602814 |
f4e39014-20dd-4aa3-9668-c9fd790a3c7a | yaoshun/CodingCompetition | HackerRank/101HackApril2016/SuperReducedString/BFsolution.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
typedef long long ll;
// Notice the case of "baab", after reducing the "aa"
// "bb" can also be reduced, indicating a recursive algorithm.
int hasReduce(s... | ALGO | 0.999971 | 5.503544 |
84caab0c-4394-4ced-89c5-676a38f3e67e | ping29065147/Exam-Collection | LeetCode/0058 - Length of Last Word.cpp | static auto fast_io = []
{
ios::sync_with_stdio(false);
cout.tie(nullptr);
cin.tie(nullptr);
return 0;
}();
class Solution {
public:
int lengthOfLastWord(string s)
{
string word;
stringstream ss(s);
while(ss >> word) ;
return word.size();
}
}; | ALGO | 0.998872 | 5.507857 |
a356f466-fd74-40f7-8181-fa53cd57c208 | FennelDumplings/DataStructure | formwork/math/数值分析/Numerical recipes/demo/src/xsvdcmp.cpp | #include <string>
#include <fstream>
#include <iostream>
#include <iomanip>
#include "nr.h"
using namespace std;
// Driver for routine svdcmp
int main(void)
{
int j,k,l,m,n;
string txt;
ifstream fp("matrx3.dat");
// read input matrices
if (fp.fail())
NR::nrerror("Dat... | ALGO | 0.997046 | 3.456182 |
3129404e-b1a6-43ba-96c6-9bb54040c503 | kmjp/procon | yuki/0001-1000/001-100/100.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<to;x++)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINU... | ALGO | 0.999997 | 3.827646 |
5baadeed-2114-4a9d-8db5-e580377f74b8 | hmittal657/coding | leetcode/perfect-squares.cpp | // https://leetcode.com/problems/perfect-squares
class Solution {
public:
int numSquares(int n) {
vector<int> dp(n+1, 0);
dp[0] = 0;
for (int i = 1; i <= n; i++) {
int ind = 1;
dp[i] = i;
while ((i - (ind * ind)) >= 0) {
dp[i] = m... | ALGO | 0.999965 | 6.164589 |
70ee7c7c-54e3-4d31-bdcc-4211f8fcbf6b | shelltdf/osgall | prebuild/eigen-3.4-rc1/doc/examples/Tutorial_ArrayClass_interop.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
MatrixXf m(2,2);
MatrixXf n(2,2);
MatrixXf result(2,2);
m << 1,2,
3,4;
n << 5,6,
7,8;
result = (m.array() + 4).matrix() * m;
cout << "-- Combination 1: --" << endl << result << endl << e... | ALGO | 0.999738 | 4.531452 |
375e11c8-ed41-4e6f-b4a6-f92ae68be61d | Mohamed-Hashem/LeetCode | 0491-non-decreasing-subsequences/0491-non-decreasing-subsequences.cpp | class Solution {
void func(int idx,vector<int>&nums,vector<int>&a,set<vector<int>>&ans){
int n=nums.size();
if(idx>=n){
if(a.size()>=2){
ans.insert(a);
}
return ;
}
if(!a.size()||nums[idx]>=a.back()){
a.... | ALGO | 0.999994 | 5.982403 |
52776f6a-39ef-42e6-99d0-9e65ce226da4 | Yosuamuliawan19/algorithm-bank | Uhunt/12502.cpp | #include<iostream>
// #include<stdio.h>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<cctype>
#include<iomanip>
#include<vector>
#include<map>
#include<climits>
#include<set>
#include<queue>
#include<string>
using namespace std;
// #include <bits/stdc++.h>
typedef long long ll;
typedef... | ALGO | 0.999728 | 3.758371 |
0745f14f-ae57-4a2b-abc1-6db72b1e2d5c | 1833183060/QCAD-niaoge | src/3rdparty/opennurbs/opennurbs_surfaceproxy.cpp | /* $NoKeywords: $ */
#include "opennurbs.h"
ON_OBJECT_IMPLEMENT(ON_SurfaceProxy,ON_Surface,"4ED7D4E2-E947-11d3-BFE5-0010830122F0");
ON_SurfaceProxy::ON_SurfaceProxy() : m_surface(0), m_bTransposed(0)
{}
ON_SurfaceProxy::ON_SurfaceProxy( const ON_Surface* s ) : m_surface(s), m_bTransposed(0)
{}
ON_SurfaceProxy::ON_... | TOOL | 0.943532 | 6.075088 |
245dc016-d499-4ffd-a8fa-8d2d379a6aca | fansuregrin/cpp_learning | cpp.primer/template_and_generic_programming/type_transformation.cpp | // topic: type transformation
#include <vector>
// use The Type Transformation Library Template Classes
#include <type_traits>
template<typename It>
auto fcn(It beg, It end)
-> typename std::remove_reference<decltype(*beg)>::type {
for (It i=beg; i!=end; ++i) {
++*i;
}
return *beg; // return a c... | TOOL | 0.920682 | 5.087902 |
339ca78b-07d7-4ff3-b26d-ec7c794d77df | raincross7/code-similarity | codes/train_code/problem291/problem291_470.cpp | //0014 Integral
//—v–ñFy=x^2Ay=0Ax=600‚Ɉ͂܂ꂽ–ʐςðAÏ•ª‚Á‚Û‚‹‚ß‚é
//‹ßŽ—“I‚Ȗʐςðo—Í‚µ‚È‚³‚¢
//“ü—͕͂¡”s‚Å—^‚¦‚ç‚êA1s‚É‚Í600‚Ì–ñ”d‚¾‚¯‚ªŠÜ‚Ü‚ê‚é@“ü—͂̏I—¹‚ÍEOF‚Å•\‚³‚ê‚é
//‚»‚ꂼ‚ê‚Ì“ü—Íd‚ɑµA‹ßŽ—“I‚Ȗʐςð1s‚²‚Ƃɏo—Í‚¹‚æ
//‚¿‚Ȃ݂Éd‚𬂳‚‚·‚ê‚·‚é‚قǁA72000000‚ɋ߂
#include<iostream>
using namespace std;
int main(void)
{
int d;
... | ALGO | 0.999402 | 3.68628 |
5b203c0c-0138-40c0-aff8-c9005b510e9e | reeteshin/FASTER_CPP | Math/222. Check if a Number is a Narcissistic Number.cpp | #include<iostream>
#include<cmath>
using namespace std;
// Input: num = 153
// Output:
// Explanation:153 is equal to 1^3 + 5^3 + 3^3, so it is Narcissistic.
int main(){
int n = 153;
int ncpy = n;
int count = 0 ;
int nosnum = 0;
while(ncpy>0)
{
count++;
ncpy = ncpy/10;
}
cout<<n<<count<<endl;... | ALGO | 0.999892 | 4.340236 |
2cc7651b-697f-4191-aa50-7ad48443f903 | minroth/Robot-Simulator | Engine/ode/src/joints/contact.cpp | #include "contact.h"
#include "joint_internal.h"
//****************************************************************************
// contact
dxJointContact::dxJointContact( dxWorld *w ) :
dxJoint( w )
{
}
void
dxJointContact::getInfo1( dxJoint::Info1 *info )
{
// make sure mu's >= 0, then calculate number ... | ALGO | 0.923591 | 5.156698 |
62949484-3eb2-4784-bf32-87a247634329 | MateusOliveiraT25/CursoFlutterDEVNOT1 | hello_world/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.997967 | 6.761023 |
df2c5f40-ebe0-4c63-a91e-765461f97a51 | MuhammadAwais984/Assignments | Pattern2.cpp | #include<iostream>
using namespace std;
int main()
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++){
cout<<" "<<j;
}
cout<<endl;
}
return 0;
} | ALGO | 0.999776 | 3.134658 |
9f45f6b6-6f71-41b7-870b-a15879324dc0 | Ma7moud1599/Algorithms | Graph/DepthFirstSearch/main.cpp | #include "Graph.h"
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
vector<string> names{"A", "B", "C", "D", "E", "F", "G", "H", "I"};
Graph g(names);
g.addEdges(0, {1, 2});
g.addEdges(1, {0, 3, 4});
g.addEdges(2, {0, 3, 5});
g.addEdges(3, {1, 2, 4});
g.addEdges(4,... | ALGO | 0.999471 | 5.214386 |
f436b951-d37f-4e13-b920-d7d85614f766 | congtoudada/CongtouAlgorithm | CongtouAlgorithm/2.最长连续递增序列.cpp | #include "Cong.h"
class Solution {
public:
int findLengthOfLCIS(vector<int>& nums) {
vector<int> dp(nums.size(), 1);
int result = 1;
for (unsigned int i = 1; i < nums.size(); i++)
{
if (nums[i] > nums[i - 1])
{
dp[i] = dp[i - 1] + 1;
if (dp[i] > result) result = dp[i];
}
}
return result;
... | ALGO | 0.999913 | 5.689275 |
7bb374fa-cd05-480a-b3dc-c30d2c1fa39a | liangzai90/Liang_Amazing-Algorithm-With-C | chap7/chap7-1.14.cpp | /*
数据结构趣题
任意长度整数加法
编写一个程序,实现任意长度的整数加法。
*/
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <vector>
#include <malloc.h>
using namespace std;
#define STACK_INIT_SIZE 20
#define STACKINCREATEMENT 10
typedef char ElemType;
typedef struc... | ALGO | 0.99992 | 3.9086 |
01780c7b-7fa1-4b20-9758-30c5dbfbee62 | SuhelKhanCA/MCA-LAB-I-WEEK | Week 7/Q5.cpp | #include <iostream>
using namespace std;
class NumberPair {
private:
double num1, num2;
public:
NumberPair(double a, double b) {
num1 = a;
num2 = b;
}
double findGreater() {
if (num1 > num2) {
return num1;
} else {
return num2;
}
}
}... | ALGO | 0.999452 | 5.823277 |
67b678eb-e563-4523-944b-e0af62e78560 | chiencheng890909/leetcode | 1367_Linked_List_in_Binary_Tree.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
/**
* Definition for a binary tree node.
* struc... | ALGO | 0.999977 | 5.093295 |
f7f7158e-951a-4ac5-aa93-01c581532b34 | AbhijeetAnand45/DSA_Basics | Programs/Graph/BipartiteGraph.cpp | #include<bits/stdc++.h>
using namespace std;
vector<vector<int>> adj;
vector<bool> vis;
vector<int> col;
bool bipart;
void color(int u, int curr) {
if(col[u] != -1 and col[u] != curr) {
bipart = false;
return;
}
col[u] = curr;
if(vis[u]) return;
vis[u] = true;
for(auto i : ... | ALGO | 0.999978 | 5.480694 |
60bc743b-e733-4af1-965d-d18ec16ef41a | akktrsst/CPP-Basic | SquareRoot_Integral.cpp | // Given a number N, find its square root. You need to find and print only the integral part of square root of N.
// For eg. if number given is 18, answer is 4.
// Input format :
// Integer N
// Output Format :
// Square root of N (integer part only)
// Constraints :
// 0 <= N <= 10^8
// Sample Input 1 :
// 10
// Sampl... | ALGO | 0.999947 | 4.788398 |
5cfe5f3b-d7a8-414e-923c-d6cd0f8b2332 | inquaid/Solved-Problems | sublime/wrong.cpp | #include <algorithm>
#include <cstdint>
#include <iostream>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <queue>
#include <math.h>
#include <climits>
#include <bitset>
#include <iomanip>
#include <numeric>
#include <chrono>
#define int long long
#define all... | ALGO | 0.999883 | 4.696054 |
5383ec67-ce4c-4ab7-8762-9502f8285896 | RahulSahOfficial/LLD | Oops/08 Multipath Inheritance.cpp | // Ambiguity and dublication
// #include<bits/stdc++.h>
// using namespace std;
// class A{
// public:
// int a;
// };
// class B:public A{
// public:
// int b;
// };
// class C:public A{
// public:
// int c;
// };
// class D:public B,public C{
// public:
// int d;
// };
// int main(){
/... | TOOL | 0.963166 | 4.402855 |
7328393f-f201-40de-88e5-1776706cf073 | gullasz/2023aaib2 | week06/week06-2c.cpp | #include <stdio.h>
int main( void )
{
int i,j;
int n;
printf("пJjp:\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
int star=n,space=i;
for(int k=0;k<space;k++)
printf(" ");
for(int k=0;k<star;k++)
printf("*");
printf("\n");
}
return 0;
}
| ALGO | 0.999965 | 3.508948 |
b4f3e391-00cb-41cd-ab8f-a2c3be64da41 | ajaxlt/OnlineProgram | 剑指Offer/和为S的连续正数序列.cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
/*
* 来源: 剑指Offer
* 题目: 和为S的连续正数序列
*
* 描述:
* 找出所有和为S的连续正数序列
* 例如, S = 100 则返回
* {{9, 10, 11, 12, 13, 14, 15, 16},
* {18, 19, 20, 21, 22}}
*
* 注: 输出所有和为S的连续正数序列。序列内按照从小至大的顺序,序列间按照开始数字从小到大的顺序
*
* 思路:
* 因为序列是连续的,因此可以利用中位数进行讨论
* 由于严格限... | ALGO | 0.999777 | 3.434724 |
256eee02-ab25-4dd6-8817-f25679b8d902 | Rocky5/XBMC4Xbox-3.6 | xbmc/SortFileItem.cpp | #include "system.h"
#include "settings/AdvancedSettings.h"
#include "SortFileItem.h"
#include "video/VideoInfoTag.h"
#include "music/tags/MusicInfoTag.h"
#include "FileItem.h"
#include "URL.h"
#include "utils/log.h"
#ifndef PRId64
#ifdef _MSC_VER
#define PRId64 "I64d"
#else
#define PRId64 "lld"
#endif
#endif
#define ... | TOOL | 0.928225 | 5.875656 |
b7d1c131-2d5d-447b-9213-b15c7f1717ad | Prateek-Pandey-96/Algorithms | 2-D DP/Interleaving String.CPP | // 97. Interleaving String
class Solution {
public:
bool isPossible(string s1, string s2, string s3, int idx1, int idx2, vector<vector<int>>& dp){
// all three exhausted
if(idx1 == s1.length() and idx2 == s2.length() and idx1+idx2 == s3.length())
return true;
// memoization
... | ALGO | 0.999697 | 5.954382 |
1fec6748-34db-4488-b3e1-3151ac09a208 | SKIRT/SKIRT9 | SKIRT/core/DustDestructionRecipe.cpp | /*//////////////////////////////////////////////////////////////////
//// The SKIRT project -- advanced radiative transfer ////
//// © Astronomical Observatory, Ghent University ////
///////////////////////////////////////////////////////////////// */
#include "DustDestructionRecipe.hpp"
#inclu... | ALGO | 0.971879 | 5.794819 |
e297397a-c367-40ae-a94a-7d5b905c48ec | lamphanviet/competitive-programming | uva-online-judge/accepted-solutions/11965 - Extra Spaces.cpp | //*****************
// LAM PHAN VIET **
// UVA 11965 - Extra Spaces
// Time limit: 1s
//********************************
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
#define maxN 505
main() {
// freopen("oo.inp", "r", stdin); freopen("oo.out", "w", stdout);
... | ALGO | 0.999594 | 3.309316 |
79523f7e-e7ab-4caf-a6ad-bd69f79500db | rsaini17/si204 | hw/hw29/hw.cpp | /*Author: MIDN Ronny Saini
*Filename: hw.cpp
*third to last reverse order
*/
#include <iostream>
using namespace std;
struct Node
{
int data;
Node* next;
};
Node* add2front(int val, Node* LIST);
int main()
{
Node* LIST = 0;
int x;
while(cin >> x && x > 0)
LIST = add2front(x,LIST);
cout << LIST... | ALGO | 0.990488 | 3.165158 |
4a6cacaf-99b7-499c-b12e-dd7eb9018dda | moisesmartincy/PRACTICANDO-C- | c++/problema10.cpp | #include<iostream>
using namespace std;
int main(){
int n,i,st,x;
cout<<"ingrese el numero n: ";cin>>n;
st=0;
for(i=1;i<=n;i++){
x=i*i-1;
st=st+x;
cout<<x<<",";
}
cout<<"\nla sumatoria es: "<<st<<endl;
return 0;
}
| ALGO | 0.998993 | 3.444324 |
bf11ec1d-5045-4dab-9257-540002b28513 | pth68/OpenTwinThirdParty | gmsh/Geo/MElementOctree.cpp | #include "GModel.h"
#include "MElement.h"
#include "MElementOctree.h"
#include "Octree.h"
#include "Context.h"
#include "fullMatrix.h"
#include "bezierBasis.h"
#include "BasisFactory.h"
#include "SBoundingBox3d.h"
void MElementBB(void *a, double *min, double *max)
{
MElement *e = static_cast<MElement *>(a);
// TO... | ALGO | 0.97679 | 6.994044 |
531b6171-b5ba-44f3-88b8-227694c388ce | zarboz/XBMC-PVR-mac | xbmc/visualizations/XBMCProjectM/libprojectM/win32-dirent.cpp | /*
Implementation of POSIX directory browsing functions and types for Win32.
Author: Kevlin Henney (<EMAIL>, <EMAIL>)
History: Created March 1997. Updated June 2003.
Rights: See end of file.
*/
#include "win32-dirent.h"
#include <errno.h>
#include <io.h> /* _findfirst and _findnext set errno iff t... | TOOL | 0.941397 | 6.454824 |
d8a50b80-632d-43de-80dc-becddcbdeaa0 | cmyang1218/Leetcode | 1765-merge-in-between-linked-lists/merge-in-between-linked-lists.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* mergeInBetw... | ALGO | 0.999978 | 4.940737 |
831a8e43-592e-4d14-8a03-eb2c815d188f | dungnguyen2112/DSA_PTIT | DSA01015.cpp | #include <bits/stdc++.h>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#define faster() \
std::ios_base::sync_with_stdio(false); \
std::cin.tie(NULL); \
std::cout.tie(NULL);
using namespace std;
using std::string;
int check(string s... | ALGO | 0.999536 | 5.872011 |
e9e5a4da-914a-44b9-b794-ff9189759d6d | TaintDroid/android_platform_frameworks_base | voip/jni/rtp/EchoSuppressor.cpp | #include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#define LOG_TAG "Echo"
#include <utils/Log.h>
#include "EchoSuppressor.h"
// It is very difficult to do echo cancellation at this level due to the lack of
// the timing information of the samples being played and recorde... | ALGO | 0.862883 | 5.026552 |
103f08c5-c3a9-4eea-a86f-799b0b9b78d1 | Shtkddud123/ODE_PDE | test/accum/accum.cpp | #include <iostream>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/moment.hpp>
using namespace boost;
using namespace boost::accumulators;
int main(int argc, char **argv)
{
... | ALGO | 0.966529 | 6.83895 |
36a76f56-f8ce-4367-8d38-05c6b3555041 | Mirtharda/ituProjects | spring24/blg252/study/e07/e07_10c.cpp | // e07_10c.cpp
// Inheritance and composition
// The owners contain pointers to part objects
// Dynmaic objects are created in the initialization lists of the constructors
#include <iostream>
using std::cout;
using std::endl;
// *** Part Class for Parent
// Defines objects that belong to Parent
class PartForParent {
... | TOOL | 0.914184 | 6.622595 |
f30bd531-d52e-4077-ba55-d0b5588762d5 | Smiteshbhore21/Daily-DSA-Problem | 2561. Rearranging Fruits.cpp | // O(nlog(n)) -->
using ll = long long;
class Solution {
public:
long long minCost(vector<int>& basket1, vector<int>& basket2) {
unordered_map<int, int> mp1, mp2, both;
size_t n = basket1.size();
for (int i = 0; i < n; i++) {
mp1[basket1[i]]++;
mp2[basket2[i]]++;
... | ALGO | 0.999974 | 5.106449 |
76522449-82fd-4711-9f85-738a41052d5c | wazenmai/Leetcode | Medium/1035_uncrossed_lines/solution2.cpp | /**
* Title: Uncrossed Lines (Leetcode Medium 1035)
* Author: Bronwin Chen <<EMAIL>>
* Date: 10, November, 2024
* Method: Memory optimization.
* Result: Time complexity O(nm). Space complexity O(m), where n = nums1.size(), m = nums2.size().
*/
class Solution {
public:
int maxUncrossedLines(vector<int>& nu... | ALGO | 0.999988 | 6.846507 |
9efe01ba-4d4e-4ef3-b86d-fb8fd33908c0 | sarvex/leetcode-haxe | solution/0100-0199/0128.Longest Consecutive Sequence/Solution.cpp | class Solution {
public:
int longestConsecutive(vector<int>& nums) {
unordered_set<int> s(nums.begin(), nums.end());
int ans = 0;
for (int x : nums) {
if (!s.count(x - 1)) {
int y = x + 1;
while (s.count(y)) {
y++;
... | ALGO | 0.999968 | 5.739486 |
7a69f368-1ef6-469d-83d4-4250256ac840 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_4627_8.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int b, c, d, e, n, i, j, s = 0, m, k;
cin >> n >> b;
int a[n];
s = b;
for (i = 0; i < n; i++) cin >> a[i];
for (i = 0; i < n - 1; i++) {
for (j = i + 1; j < n; j++) {
k = b % a[i] + a[j] * (b / a[i]);
s = max(s, k);
}
}
cout ... | ALGO | 0.999919 | 3.516037 |
63862cea-bf8d-4bde-8916-a91cc90b82ad | calos9999/simplecalc | calc.cpp | #include <iostream>
#include <cmath>
#include <cstdlib>
#include <typeinfo>
using namespace std;
int main () {
int somma =0;
int differenza =0;
int prodotto =0;
int quoziente =0;
int resto=0;
int potenza=0;
int a=0;
int b=0;
char confermauscita=0;
char invio=0;
cout << "SUPER CA... | ALGO | 0.921145 | 3.126921 |
98628c71-9b21-4e4c-b3ce-c64de2dcf077 | SourabhGurwani/Leetcode-Question | 739-daily-temperatures/daily-temperatures.cpp | class Solution {
public:
vector<int> dailyTemperatures(vector<int>& temperatures) {
int n = temperatures.size();
vector<int> ans(n, 0);
for (int i = n - 2; i >= 0; i--) {
int j = i + 1;
while (j < n && temperatures[j] <= temperatures[i]) {
if (ans[j... | ALGO | 0.999982 | 6.994833 |
d141fa19-8941-478f-b8b7-509cafe0b0d4 | hjiang13/LLMs-in-IR | POJ-104/40/2982.cpp | #include <iostream>
using namespace std;
double f(double a,double b,double c,double d,double r)
{
double s,s1,s2,co;
s=0.5*(a+b+c+d);
r=r/180;
r=r/2;
r=r*PI;
co=cos(r);
s1=(s-a)*(s-b)*(s-c)*(s-d)-a*b*c*d*co*co;
if(s1<0) return 0;
s2=sqrt(s1);
return (s2);
}
int main()
{
double a,b,c,d,s1;
double r,s;
cin >> "%lf %lf %l... | ALGO | 0.999928 | 3.877113 |
ae49bae2-6c0b-4915-903a-ca1c1e4c7771 | tynnp/CP-Practice | CSES/Sorting and Searching/Apartments.cpp | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int MAXN = 2e5 + 5;
int n, m, k;
int ans, a[MAXN], b[MAXN];
int32_t main() {
cin.tie(0) -> sync_with_stdio(0);
cin >> n >> m >> k;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < m; i++)
cin >> b[... | ALGO | 0.999865 | 3.838448 |
3c13f0aa-1ce0-4da8-b9ec-ec68def35f12 | mijanurm21/GFG-Solutions | Hard/Median in a row-wise sorted Matrix/median-in-a-rowwise-sorted-matrix.cpp | //{ Driver Code Starts
//Initial template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
int blackbox(vector<vector<int>> &mat, int n){
int count= 0;
for(int i = 0; i<mat.size(); i++){
co... | ALGO | 0.999985 | 5.9399 |
003d670a-5e02-4402-98a0-a797d75a0d98 | mayankkaushik187/AlgoViser | Graphs/isGraphBipartite.cpp | #include<bits/stdc++.h>
using namespace std;
bool isBipartite(vector < vector < int >> graph) {
int n = graph.size();
vector < int > colors(n, 0);
queue < int > q;
for (int i = 0; i < n; i++) {
if (colors[i]) continue;
colors[i] = 1;
q.push(i);
while (!q.empty()) {
int temp = q.front(... | ALGO | 0.999782 | 5.556367 |
6ec08b7d-d230-4c4d-a793-3f23a8a7ad30 | mihirp19/Cpp_Assignment | Lec_2_3.cpp | //multiple inheritance
#include<iostream>
using namespace std;
class A{
public:
void sum(int a, int b){
cout<<"this is sum: "<<a+b<<endl;
}
};
class b:public A{
public:
void mult(int a, int b){
cout<<"Multiplication of 2 nums: "<<a*b<<endl;
}
};
class c:public A{
public:
void div(int a, int b){
cou... | TOOL | 0.90602 | 3.777244 |
f6343560-67bf-469f-9791-32b06903f8c1 | MatchaCake/LC | 412.cpp | class Solution {
public:
vector<string> fizzBuzz(int n) {
std::vector<string> list(n,"");
for (int i = 1; i <= n; i++) {
if (i%3 ==0&& i%5==0) {
list[i-1] = "FizzBuzz";
}
else {
if (i%3==0) {
list[i-1] =... | ALGO | 0.99986 | 6.785519 |
ef6c2d79-7170-4ad2-be64-44034a06cdd4 | zarinanazargali/PP1 | lab1j.cpp | #include<iostream>
using namespace std;
int main(){
int a;
cin >> a;
if(a%2==0){
cout<< "The number is even";
}
else{
cout << "The number is odd";
}
return 0;
} | ALGO | 0.993257 | 3.652192 |
255fd510-34d7-4f27-b0b1-6be403d6160e | superpozycja/cses | sorting_and_searching/sliding_window_cost.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template<class T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<class T> using ordered_set = tr... | ALGO | 0.999994 | 3.806946 |
dd696b95-c557-4da9-92c1-5be6af4f3210 | hfukuoka/atcoder | abc/215/a.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep_up(i, a, n) for (ll i = a; i < n; ++i)
#define rep_down(i, a, n) for (ll i = a; i >= n; --i)
#define P pair<ll, ll>
#define all(v) v.begin(), v.en... | ALGO | 0.996925 | 3.344375 |
9889a9c1-47e6-4a39-9ed6-4d6cdb0645ca | Hanawh/LeetCode | 数据结构/数组和字符串/杨辉三角.cpp | class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> result(numRows);
for(int i = 0; i < numRows; ++i){
result[i].resize(i+1); //resize()操作:创建指定数量的的元素并指定vector的存储空间
result[i][0] = result[i][i] = 1;
for(int j = 1; j < i; ++j){... | ALGO | 0.999957 | 5.667034 |
06a59013-dec4-41c1-ae3f-876b26957da0 | KartikProgrammed/DSA-daily | 7_July'25.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <limits>
#include <iomanip>
#include <sstream>
#include <fstream>
using namespace std;
// 1353. Maxim... | ALGO | 0.999958 | 6.138575 |
ba0c983e-5416-48ca-8ce9-0b82f7989f8d | fee1ng/Leetcode | 链表/合并K个升序链表.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
//ϲ
class Solution {
public:
ListNode* mergeKL... | ALGO | 0.999918 | 5.761896 |
ec3f1b82-4b34-4562-a47f-69bd0e63aa86 | jayram10125/LEVEL-BOOSTER-C- | ARRAY/take5inputAndPrintInReveseOrder.cpp | //take 5 input and print it in reverse order
#include<iostream>
using namespace std;
int main()
{
int a[5];
cout<<"enter the 5 elements of array : "<<endl;
for(int i=0;i<5;i++)
{
cin>>a[i];
}
cout<<"the reverse elements of array are :"<<endl;
for(int i=4;i>=0;i--)
{
cout... | ALGO | 0.994372 | 3.250475 |
c4cd120e-118d-404c-a614-cf2a32608aba | ahhcash/CP | Codeforces/dubstep.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
string a;
cin >> a;
int n=a.length();
int i=0;
while(i<n){
if(a[i]=='W' && a[i+1]=='U' && a[i+2]=='B'){
a[i]=' ', a[i+1]=' ', a[i+2]=' ';
i+=2;
}
i++;
}
i=... | ALGO | 0.999787 | 3.509273 |
74f7d823-acfc-4fde-a023-40d7ede33d13 | tachyon83/code-rhino | DAY001~099/DAY52-Programmers-기능개발/wwnam.cpp | #include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
vector<int> solution(vector<int> progresses, vector<int> speeds) {
const int FINISH = 100;
int nProgresses = progresses.size();
vector<int> answer;
vector<int> cost(nProgresses);
for (int i = 0; i < nProgresses; i++) {
... | ALGO | 0.999921 | 5.428586 |
79cc7021-9dba-4c08-a21d-6c61cefa07ed | ThirdProject/android_frameworks_av | media/libstagefright/codecs/amrwb/src/highpass_50hz_at_12k8.cpp | /*
------------------------------------------------------------------------------
Filename: highpass_50Hz_at_12k8.cpp
Date: 05/08/2004
------------------------------------------------------------------------------
REVISION HISTORY
Description:
---------------------------------------------------------------... | ALGO | 0.999954 | 5.747896 |
2c4d1143-0266-4e2b-ac40-2ea0fb8a24d8 | Ausaf1/DSA_AND_CP | 1519-number-of-nodes-in-the-sub-tree-with-the-same-label/1519-number-of-nodes-in-the-sub-tree-with-the-same-label.cpp | class Solution {
public:
vector<int> ans;
vector<int> dfs(int node,vector<int> adj[],string &labels,int parent){
vector<int> cnt(26,0);
for(auto x : adj[node]){
if(x != parent){
auto t = dfs(x,adj,labels,node);
for(int i = 0;i < 26;i++) cnt[i] += t[i];... | ALGO | 0.999951 | 6.237389 |
6ab660f6-80c8-4d8e-b6c4-595120b5b643 | TheOneAndOnlyTurbanator/BigInt_and_Decipher_Program | decipher.cpp | #include "bigint.h"
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char* argv[]) {
if (argc != 2) {
cout<<"\033[1;41m----Missing an argument----\033[0m"<<endl;
cout << "Usage: ./decipher <file>"<<endl;
cout << "Examples:" << endl;
cout << "\t./decipher secret/message1.txt \0... | ALGO | 0.976006 | 3.657765 |
6d99f81a-aeed-4f99-b0bf-64eef3d40e35 | hongjianMa/cpp | 数据结构/b站学习版/栈/链式栈/中缀表达式转后缀表达式.cpp | #include <iostream>
#include <string>
#include <stack>
using namespace std;
//优先级函数
bool Priority(char ch, char topch)
{
if ((ch == '*' || ch == '/') && (topch == '+' || topch == '-'))
return true;
if (topch == '(')
return true;
return false;
}
// 中缀表达式转后缀表达式
string MiddleToEndExpr(string ... | ALGO | 0.999903 | 3.886506 |
8136eeb6-2723-4ea3-bd94-88f689fdbe16 | mohitmcanitt/Programming-Code | Binary Tree/01.BuildBinaryTree.cpp | #include <iostream>
using namespace std;
class node{
public:
int data;
node* left;
node *right;
node(int d)
{
data=d;
left=NULL;
right=NULL;
}
};
node *buildTree()
{
int val;
cin>>val;
if(val==-1)
return NULL;
node *root=new node(val);
... | ALGO | 0.999984 | 4.687964 |
2d23ec7a-2723-426e-a988-0a811a494214 | epotion/cPlusPlusHomework- | 2112080159_甘峻豪/Chapter06/T6_35.cpp | /*
*FileName: T6_35.cpp
* Auther: Junhao Gan
* E-mail: <EMAIL>
* Date: Apr 9th, 2022
* College: School of Computer Science and Information Engineering
* Function:guess number(pro).
*/
#include<iostream>
#include<ctime>
#include<cstdlib>
using namespace std;
int main()
{
int num,choise;
int counter = 0;
srand((u... | ALGO | 0.899697 | 3.052151 |
d4a70e9c-05d0-4651-901a-798ac67be6b3 | Janos95/Phasefields | Optimization/Tree.cpp | //
// Created by janos on 7/27/20.
//
#include "Tree.h"
#include "Mesh.h"
#include "C1Functions.h"
#include "Bfs.h"
#include "Bvh.h"
#include <Corrade/Utility/Algorithms.h>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Utility/FormatStl.h>
#include <Magnum/Math/Vector4.h>
#include <Magnum/Magnum.h>... | ALGO | 0.999252 | 3.197288 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.