uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
972757f2-6583-4f58-83f2-7ecfb16313ca
AbdullaKhan01/Competitive-Programming
GoodBye2024/D/sol.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // #define mod 1000000007 #define mod 998244353 #define ceil(a,b) ((a+b-1)/b) #define floor(a,b)((a-b+1)/b) #define fast_io() ios::sync_with_stdio(0);cin.tie(0); #define ll long long #define int long long #define vi ve...
ALGO
0.9999
4.205415
1b76f856-a26a-4db7-ab22-d3525196ebb4
IEIAuto/AutoDRRT
src/autodrrt.tools/direct_visual_lidar_calibration-main/src/vlcal/common/estimate_fov.cpp
#include <vlcal/common/estimate_fov.hpp> #include <Eigen/Core> #include <Eigen/Geometry> #include <dfo/nelder_mead.hpp> #include <dfo/directional_direct_search.hpp> #include <vlcal/common/frame_cpu.hpp> #include <pcl/point_types.h> #include <pcl/point_cloud.h> #include <pcl/surface/convex_hull.h> #include <pcl/filte...
ALGO
0.999087
6.63484
8a5d3bf4-6e25-4c57-a2b5-7d78743f1019
jun971006/AlgorithmStudy
AboutCpp/count_if1_1.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> a = {1, 4, 1, 2, 4, 2, 4, 2, 3, 4, 4}; int even = count_if(a.begin(), a.end(), [](int x) { // ************ [](int x) return x % 2 == 0; return x % 2 == 0; }); int odd = count_if(a.begin(), a.end(), [](int x){...
ALGO
0.998471
5.045281
01fbe980-9ec9-4f93-96fc-f3880b605b16
naitikjpatel/Problem-Solving-Skills
Arrays Program/AddtionOfArray.cpp
#include<iostream> using namespace std; int main(){ int arr[5]; cout<<"\nENter the element"<<endl; for (int i = 0; i < 5; i++) { cin>>arr[i]; } int sum=0; for (int i = 0; i <5; i++) { sum+=arr[i]; } cout<<"\nThe Array Sum is "<<sum<<endl; return 0; }
ALGO
0.997257
3.294725
af26db6c-cbf6-42d5-8ea3-b5d3aa85d745
cle596/ChessinC-
chess/main.cpp
#include <iostream> #include <string> #include <map> #include <vector> #include <algorithm> #include <typeinfo> #include <ctime> #include "node.h" #include "game.h" #include "search.h" using namespace std; int main() { Game g = Game(); Search s = Search(); s.depth = 3; while (true) { g.root.print(); if (g...
ALGO
0.988858
3.959588
4f558515-0e96-4ddb-aa4b-edf8109a915c
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10519_7.cpp
#include<bits/stdc++.h> using namespace std; signed main(){ int a,b,c; while(scanf("%d%d%d",&a,&b,&c),(a+1)||(b+1)||(c+1)){ if((a+1)&&(b+1)&&a+b>=30){ if(a+b>79)printf("A\n"); else if(a+b>64)printf("B\n"); else if(a+b>49)printf("C\n"); else if(c>49)printf("C\n"); else printf("D\n");} else printf("F...
ALGO
0.999526
3.660294
4bb10073-6f11-4159-bfb7-c1c22eaf1377
Altu-Bitu-2/Altu-Bitu_algo
03월 29일 - 동적 계획법/9095.cpp
#include <iostream> #include <vector> using namespace std; const int MAX = 10; // 정수 n은 양수이며 11보다 작은 값이기 때문에 max값을 미리 설정한다. vector<int> dp(MAX + 1); //dp에 사용되는 vector을 max+1로 사이즈를 설정한다. //top-down 방식 dp 채우기 int numberOfCasesTop(int n) { if (n < 0) { // n이 0보다 작을 경우 0을 리턴한다. recursive하게 사용하므로, 마지막에 n-1<0이 될 경우를...
ALGO
0.999852
5.597343
906215c8-5d78-4e59-bb97-88c5811244a4
KWJYES/face_kaoqin
app/src/main/jni/yoloface.cpp
#include "yoloface.h" #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include "cpu.h" #define clip(x, y) (x < 0 ? 0 : (x > y ? y : x)) std::vector<cv::Mat> faceVector; // 暂存图片中的人脸图片 std::vector<cv::Mat> faceVector_save; // 存储图片中的人脸图片 std::vector<std::st...
ALGO
0.877212
4.016846
1e371456-c62a-46dc-b516-31ee6fa0ded1
salmadalaty/Module
CPP09/ex02/PmergeMe.cpp
#include "PmergeMe.hpp" PmergeMe::PmergeMe() {} PmergeMe::~PmergeMe() {} // The merge function runs in O(n) time, where n is the total number of elements in the two subarrays template <typename Container> void PmergeMe::merge(Container& container, int left, int mid, int right) { int n1 = mid - left + 1; int ...
ALGO
0.999778
6.351607
28478eb0-3878-4051-88a2-484163a656fa
dabaier/code
数据处理相关文件/Dataset/train/23_LegalIdentifer/Legalidentifer-14.cpp
#include <iostream> using namespace std; int main() { char a; cin>>a; if (a>=65&&a<=90||a==95||a>=97&&a<=122) { cout<<"Yes"; } else { cout<<"No"; } return 0; }
ALGO
0.999044
3.082006
90a91774-0f5f-4671-9b53-7c33307a143c
HemanOliver-477/sorts
bubble_sort.cpp
#include <iostream> void print_array(int array[], int size) { for (int i = 0; i < size; i++) { std::cout << array[i] << ", "; } std::cout << std::endl; } void swap(int *a, int *b) { int temp = *a; *a = *b; *b = *a; } void bubble_sort(int array[], int size) { for (int i = 0; i < s...
ALGO
0.999598
5.575003
8b313f7d-8e4b-4e69-b9be-7532ef20a5f3
lulu10922/codes
unique paths02/main.cpp
#include <iostream> #include<vector> using namespace std; class Solution { public: int uniquePathsWithObstacles(vector<vector<int> >& obstacleGrid) { int m=obstacleGrid.size(),n=obstacleGrid[0].size(); vector<vector<int> > grid(m,vector<int>(n,0)); for(int i=n-1;i>=0;i--) { ...
ALGO
0.999547
4.954646
bb2a7925-7c4a-487a-8d82-12986abdb953
LeoParadox10/CodingPractice
1615-range-sum-of-sorted-subarray-sums/range-sum-of-sorted-subarray-sums.cpp
typedef long long ll; const ll mod=1e9+7; class Solution { public: int rangeSum(vector<int>& nums, int n, int left, int right) { vector<ll> tmp; ll sum=0; for(int i=0;i<n;i++) { sum=nums[i]; tmp.push_back(sum); for(int j=i+1;j<n;j++) { ...
ALGO
0.99999
4.828661
35b22561-928d-4a9f-9dfb-97b2efef3059
AnuranjN/30Days-Of-DSA
Basics/Recursion/n-1_backtrack.cpp
#include<iostream> using namespace std; void name(int i,int N){ if(i>N){ return; } name(i+1,N); cout<<i<<endl; } int main(){ int N; cin>>N; name(1,N); }
ALGO
0.999711
4.130156
7073a451-902f-48e3-8bcf-b93ba5d24eb9
SinghRajan41/code
MY_CPP/CF/Normal/1735A.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; cout << (n - 6) / 3 << "\n"; } return 0; }
ALGO
0.999897
3.813865
5c0583ef-dca4-4799-abbd-79dc76eb3266
codeAbinash/leetcode-solutions
leetcode/problems/cpp/maximum-number-of-vowels-in-a-substring-of-given-length.cpp
// by @codeAbinash // Time : O(n) // Space : O(1) #include "string" using namespace std; class Solution { bool inline isVowel(char ch) { return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u'; } public: int maxVowels(string s, int k) { int len = s.length(); int vowels = 0, max...
ALGO
0.999946
5.952486
63800738-c05c-45aa-9d2a-aa5fb754edb9
svenboogaartalten/box2d
Box2D_v2.3.0/Box2D/Box2D/Dynamics/Joints/b2GearJoint.cpp
#include <Box2D/Dynamics/Joints/b2GearJoint.h> #include <Box2D/Dynamics/Joints/b2RevoluteJoint.h> #include <Box2D/Dynamics/Joints/b2PrismaticJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Gear Joint: // C0 = (coordinate1 + ratio * coordinate2)_initial // C = (coordinate1 + ratio ...
ALGO
0.953033
6.952128
83faae26-2b1b-49b6-9469-5df1116353fd
rahulvarma5297/TUF-Tree-Graph-DP
3_DP/Part-3 DP on Subsequences/L24 Rod Cutting Problem/Rod-Cutting-Problem.cpp
//* https://www.codingninjas.com/codestudio/problems/rod-cutting-problem_800284?source=youtube&campaign=striver_dp_videos&utm_source=youtube&utm_medium=affiliate&utm_campaign=striver_dp_videos&leftPanelTab=0 //* https://youtu.be/mO8XpGoJwuo #include <bits/stdc++.h> using namespace std; int rec(int ind, int target, ve...
ALGO
0.999763
5.204166
0b53ee7a-05a1-476a-b2a8-0ac5bb8b42b5
ishandutta2007/codeforces
egor.lifar/normal/152/C.cpp
#include <iostream> #include <sstream> #include <algorithm> #include <cstdio> #include <vector> #include <algorithm> #include <map> #include <set> #include <queue> #include <cmath> #include <unordered_map> using namespace std; #define M 1000000007; int n, m; string s[101]; set<int> ss[101]; int main() { cin >> n >...
ALGO
0.99995
4.089631
7d746aa1-cae4-48c1-99be-91da8067768a
GramKoski/Codeforces-Problems
1931E.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cstring> #include <functional> using namespace std; int main() { int t; cin >> t; while (t--) { int n, m; cin >> n >> m; int a; string str; vector<int> lead_zeros(n, 0); int sum = 0; for (int i = 0; i < n; ++i) { cin >> str; sum +=...
ALGO
0.999863
5.355086
040a0672-5f4a-4257-89aa-83d6089d3b19
lisa3907/bitcoin.vs2013
src/rpcnet.cpp
#include "net.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; Value getconnectioncount(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getconnectioncount\n" "Returns the number of connections to other nodes."); ...
WEB
0.921086
6.626678
d661fbde-8789-40f0-bbea-4b3fe5402d28
sarvex/solution-cpp
2333.minimum_sum_of_squared_difference.cpp
using ll = long long; class Solution { public: long long minSumSquareDiff(vector<int>& nums1, vector<int>& nums2, int k1, int k2) { int n = nums1.size(); vector<int> d(n); ll s = 0; int mx = 0; int k = k1 + k2; for (int i = 0; i < n; ++i) { d[i] = abs(num...
ALGO
0.999979
5.244049
a6b9d705-0f5a-45ef-9fcb-93d58ac4502a
vidsinghal/Cornucopia
HashEnabledLLVM/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
// <vector> // void push_back(const value_type& x); #include <vector> #include <cassert> #include "asan_testing.h" #include "test_macros.h" // Flag that makes the copy constructor for CMyClass throw an exception static bool gCopyConstructorShouldThrow = false; class CMyClass { public: CMyClass(int tag); pu...
TEST
0.925598
6.432074
93ffe70b-1f72-4678-b0d0-15c776f4f35d
NataliaN24/Data-Structures-and-Algorithms-2023-2024
Test 02/09-2023-2024 Solution.cpp
#include <bits/stdc++.h> using namespace std; class DoublyLinkedListNode { public: int data; DoublyLinkedListNode *next; DoublyLinkedListNode *prev; DoublyLinkedListNode(int node_data) { this->data = node_data; this->next = nullptr; this->prev =...
ALGO
0.99993
5.020801
4c3bb1a4-6f58-4282-b572-280f14563129
alexandraback/datacollection
solutions_5752104073297920_0/C++/ZEROm/text.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<vector> #include<queue> using namespace std; const int maxn = 1005; int a[maxn]; int main() { freopen("input.in","r",stdin); freopen("output.txt","w",stdout); int t,Case=0; scanf("%d",&t); while(t--) { int...
ALGO
0.99637
4.468784
e20ca7e3-01be-446f-8602-2b9e8fbc85fc
opensource-hisense/SmartTV-SeriesVidaaU7_NT
oss/part1/cobalt/third_party/llvm-project/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
#include "clang/Tooling/Refactoring/Rename/USRFindingAction.h" #include "clang/AST/AST.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Basic/FileManager.h" #include "clang/Frontend/CompilerInstance.h" #include...
TOOL
0.96081
7.718776
cd16b0f1-f652-4ad3-ba5e-83569d0fef1c
Ozlemhezer/lab-exercises
lab11.cpp
/*Soru 1: Main fonksiyonu ierisinde verilen bir doal sayya kadar olan (bu say dahil) tm saylarn toplamn rekrsif bir fonksiyon kullanarak hesaplayanz.*/ #include<stdio.h> int fun(int n) { if(n==1) { return 1; } else { return n + fun(n-1); } } int main() { int n; printf("bir sayi giriniz = \n"); scanf("%d",&...
ALGO
0.999593
3.600652
f982f8e6-015d-428b-90c9-60dc592e7a20
KL0-6/LuauWebsockets
third-party/Luau/Ast/src/TimeTrace.cpp
#include "Luau/StringUtils.h" #include <mutex> #include <string> #include <stdlib.h> #ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef NOMINMAX #define NOMINMAX #endif #include <windows.h> #endif #ifdef __APPLE__ #include <mach/mach.h> #include <mach/mach_time.h> #endif #include ...
TOOL
0.912233
6.948785
b1eaad16-a5c3-4827-8aa6-a34c60c99fbc
ilyasBenismael/E-commerce-Flutter_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.9988
6.76073
0ba2d9fe-9cc1-4939-a46c-28d908112d4f
Harutyunyan98/Cpp-Projects
C++ խնդիրներ (Հայերեն լեզու)/04 Դասեր (class)/Խնդիր 06 Կեսօրին մոտ/Խնդիր 06 Կեսօրին մոտ.cpp
// Խնդիր 06 Կեսօրին մոտ.cpp /* Գրել ծրագիր, որում իրակացված է Time դասը, որի օբյեկտներն իրենցից ներկայցնում են ժամանակը։ Ժամանակը տրվում է ժամ (0-ից 23) և րոպե (0-ից 59) դաշտերով։ Ծրագիրը մուտքում պետք է ստանա N ժամանակի մասին տեղեկություն՝ ժամ և րոպե, ապա պետք է արտածի կեսօրին ամենամոտ 2 ժամանակները։ Սկզբում պետքէ ար...
ALGO
0.999891
4.243744
5bdfb503-a06e-417f-a6ce-a8d4cadf05b0
lframosferreira/aoc-2024
day20/part2.cpp
// pescoço pra baixo é canela #include <bits/stdc++.h> using namespace std; #define _ \ ios_base::sync_with_stdio(0); \ cin.tie(0); #define endl '\n' #define sz(v) (int)v.size() #define f first #de...
ALGO
0.999796
4.006324
754dfac6-5692-4f2f-9675-ccf28881335b
turbin/WizeClient-2.1.0-fixed
lib/cryptopp/zlib.cpp
// zlib.cpp - written and placed in the public domain by Wei Dai // "zlib" is the name of a well known C language compression library // (http://www.zlib.org) and also the name of a compression format // (RFC 1950) that the library implements. This file is part of a // complete reimplementation of the zlib compression...
TOOL
0.916203
7.239867
8567eff4-d52f-41b4-8d95-764ae7b12133
kdh1o/BOJ
Gold/1253: 좋다 (G4).cpp
#include <iostream> #include <algorithm> using namespace std; long long arr[2001]; int main() { int n; cin>>n;//10 if(n<3) { cout<<0; return 0; } for(int i=0;i<n;i++) cin>>arr[i]; // 1 2 3 4 5 6 7 8 9 10 sort(arr,arr+n); int cnt=0; for(int ...
ALGO
0.999927
4.150547
531d9219-2eef-452f-be55-d926d39187d7
BeauJoh/ppm
ppm/sha1.cpp
#include "sha1.h" /**! * @author rannou_s * Performs a circular left shift * S^n(X) = (X << n) OR (X >> 32-n) */ static uint sha1_op_left_shift(uint n, uint x) { return (x << n) | (x >> (32 - n)); } /**! * @author rannou_s * Performs the F function (returns a different bitwise according to t) */ static u...
ALGO
0.992998
5.770494
69bd3954-2fc3-4ffd-bbdf-9a579007b161
kartiktyagi7/Data-Structure-lab
12_Power_set.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } for (int i = 0; i < pow(2, n); i++) { cout << "{"; for (int j = 0; j < n; j++) { if (i & (1 << j)) ...
ALGO
0.998271
4.930267
247d9723-b768-48af-97bd-7632b6206031
g310v/CompetitiveProgramming
AtCoder/ABC058C.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector<map<char, int>> v(n); for (int i = 0; i < n; i++) { string a; cin >> a; for (char c : a) { v[i][c]++; } } string ...
ALGO
0.999985
4.566402
3ecf27cf-725a-4905-ab4a-7cd3e654f8ac
bluster980/Leetcode-Solutions
2279-maximum-bags-with-full-capacity-of-rocks/2279-maximum-bags-with-full-capacity-of-rocks.cpp
class Solution { public: int maximumBags(vector<int>& capacity, vector<int>& rocks, int additionalRocks) { vector<int> ans; for(int i=0; i<rocks.size(); i++){ ans.push_back(capacity[i]-rocks[i]); } sort(ans.begin(),ans.end()); int count = 0; for(int i=0; i...
ALGO
0.999739
5.605455
1fe16738-fe68-40b0-8d38-c32cfe5e2b3a
irshad800/remainder
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.9988
6.76073
824d8bb0-b0f4-4c84-81ea-3bb8c1832c54
saac/BackBone_GRN
codigoNullModel/NullMod.cpp
#include <stdlib.h> #include <vector> #include <fstream> #include <string> #include <iostream> #include <sstream> #include <math.h> using namespace std; using std::string; int main(int argc, char** argv) { ifstream entrada; ofstream salida; ofstream parametros; entrada.open(argv[1]); float ...
DATA
0.93757
3.112399
7515e0f5-755b-46b4-acd2-77aeb5a7e49c
VUHAILAM/ICPC-WORKSHOP
22_9/J/J2.cpp
#include <bits/stdc++.h> using namespace std; // LOOP #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORE(i, a, b) for (int i = (a); i <= (b); i++) #define FORD(i, a, b) for (int i = (a); i >= (b); i--) // // DEBUG #define format(x) << #x << ": " << (x) #define com << ", " #define ndl << "\n" #define d...
ALGO
0.999781
3.788047
47958ca1-3a14-42b0-a15f-56e52c512e00
Eguchi-Ryo/m-thesis
mpm_mac/Source/Particle.cpp
#include "../Header/Particle.h" #include "../Header/Parameters.h" #include <cstdlib> #include <iostream> #include "../Header/Grid.h" #include <algorithm> using namespace Eigen; #define MAX_PID_FORCE 1e11 Particle::Particle(){ } Particle::~Particle(){ } Particle::Particle(Vector3d Position, Vector3d Velocity, doubl...
ALGO
0.99151
4.630225
8791aef2-c996-4396-a66a-2c2930abb7fc
Henrik-Yao/NEUQ-ACM-Solution
week4/唐新宇/3.cpp
#include<bits/stdc++.h> using namespace std; bool num[10000009]; int Num; void Eratosthenes(int n) { for (int i=2; i<=n; i++) { if (num[i]) { Num++; for (int j=i; j<=n; j+=i) { num[j]=false; } } } } int main() { int n; cin>>n; fo...
ALGO
0.999728
4.347542
d4cc203c-8161-43bf-9ede-a0f7aed77aed
gauravk268/Competitive_Coding
LeetCode/1470. Do Shuffle the Array.cpp
class Solution { public: vector<int> shuffle(vector<int>& nums, int n) { vector<int> new1; for(int i=0;i<=n-1;i++) { new1.push_back(nums[i]); } vector<int> new2; for(int i=n;i<=2*n-1;i++) { new2.push_back(nums[i]);...
ALGO
0.999982
6.005994
4cc4b6eb-1d09-4594-8f99-4c11be296c82
gyrsh/coding-blocks-c-
check_prime.cpp
/*CHECK PRIME Take as input a number N, print "Prime" if it is prime if not Print "Not Prime". Input Format: Constraints: 2 < N <= 1000000000 Output Format Sample Input 3 Sample Output Prime*/ #include<bits/stdc++.h> using namespace std; int main(){ int p; cin>>p; if(p==2){ cout<<"Prime"<<"\n"; ...
ALGO
0.999439
4.130498
255f2c12-3e1f-495c-a30a-7bef4a955394
darshanp2005/My-DSA-Codes
2array + vector/7D_pairsum.cpp
#include<iostream> #include<vector> using namespace std; int main(){ vector<int>arr{10,20,40,60,70}; int sum = 80; //print all pairs //outer loop will traverse for each element for(int i=0;i<arr.size();i++){ int element = arr[i]; //for every elem we traverse aage vale elements ...
ALGO
0.999138
4.150848
905bd91d-f9e8-411b-a834-2f90451e0f15
nosianuri/Introduction-to-Algorithms
module4/count_apartments_2.cpp
#include<bits/stdc++.h> using namespace std; const int dx[] = {0, 0, 1, -1}; const int dy[] = {1, -1, 0, 0}; int n, m; vector<char> bui; vector<bool> vis; int dfs(int x, int y) { vis[x * m + y] = true; int rooms = 1; for (int i = 0; i < 4; ++i) { int newX = x + dx[i]; int newY = y + dy[i]...
ALGO
0.999902
4.54483
8eb7767e-bf6d-4a21-a421-5ec927e842ca
yuta1024/aoj
Volume 1/0102.cpp
#include <cstdio> #include <vector> using namespace std; int main() { int n; while (~scanf("%d", &n)) { if (n == 0) break; vector<vector<int> > table(n+1, vector<int>(n+1)); for (int i = 0; i < n; ++i) { int sum = 0; for (int j = 0; j < n; ++j) { scanf("%d", &table[i][j]); sum += t...
ALGO
0.99952
3.105346
a8f3e5c5-48a8-4c6c-94dc-e3ef3ab0d731
nuriinn/CSC126-Projects
[exercise] calcDistance.cpp
#include <iostream> using namespace std; double calcDistance ( double speed , double timePeriod); int main() { int highest; double speed, timePeriod, distance=0 , times; for (int i = 1; i<3; i++){ cout<<"Car " <<i <<endl; cout<<"Enter the speed: "; cin>>speed; cout<<"Enter the time period: "...
ALGO
0.999039
4.308016
2de3622a-de8e-4876-a88e-0145d50686d8
akshbansal61203/Dynamic-Programming
minimum_falling_path_sum.cpp
class Solution { public: int f(vector<vector<int>>&dp,vector<vector<int>>&matrix,int i,int j){ if(i<0||j>=matrix.size())return 1e9; if(i==0)return matrix[0][j]; if(dp[i][j]!=-1)return dp[i][j]; int up=matrix[i][j]+f(dp,matrix,i-1,j); int lf=matrix[i][j]+f(dp,matrix,i-1,j-1); ...
ALGO
0.999993
6.096911
924f94e2-4981-462d-9e19-668314110c2a
azamat-rizuan/HPS-SS-model
1. LAMMPS_subroutines/angle_bch.cpp
#include <cmath> #include <cstdlib> #include "angle_bch.h" #include "atom.h" #include "neighbor.h" #include "domain.h" #include "comm.h" #include "force.h" #include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace MathConst; #define SMALL 0.001 /* ---------------------...
ALGO
0.999209
5.687422
ad21d3c6-54d5-4f8d-89c3-8b026ec89dac
roglau/LeetCode
0013-roman-to-integer/0013-roman-to-integer.cpp
using namespace std; class Solution { public: int romanToInt(string s) { unordered_map<char, int> hash; hash.insert({'I', 1}); hash.insert({'V', 5}); hash.insert({'X', 10}); hash.insert({'L', 50}); hash.insert({'C', 100}); hash.insert({'D', 500}); has...
ALGO
0.99985
6.10487
f3e0b9b9-f6c2-4840-a78f-35a2751c8645
yonatanzamir/Shortest-Path-Algorithms-
PriorityQueueHeap.cpp
#include "PriorityQueueHeap.h" PriorityQueueHeap::PriorityQueueHeap(int max): PriorityQueue(max) // create an alloceted heap { data = new PqCell[max]; places = new int[max]; allocated = 1; } PriorityQueueHeap::PriorityQueueHeap():PriorityQueue() { } void PriorityQueueHeap::Build(PqCell* arr, int n) //BuildHeap wit...
ALGO
0.998485
3.922647
bb77a4bf-bf10-4bec-9b2d-bf5f956695b9
ishandutta2007/codeforces
kenaj712/normal/1041/E.cpp
#include<bits/stdc++.h> using namespace std; vector<int> v; queue<int> q; int tab[1005]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int a,c,d; cin>>a; for(int x=0;x<a-1;x++) { cin>>c>>d; if(d!=a) { cout<<"NO"; return 0; } v.pu...
ALGO
0.999952
3.160719
cb62875d-40b9-450e-b180-1671c35829c3
ROCm/firdev-llvm-project
libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end.pass.cpp
// <algorithm> // template<ForwardIterator Iter1, ForwardIterator Iter2> // requires HasEqualTo<Iter1::value_type, Iter2::value_type> // constexpr Iter1 // constexpr after C++17 // find_end(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2); #include <algorithm> #include <cassert> #include "test_macros.h" ...
TEST
0.971656
6.533713
90c7cc39-8e3e-4700-a365-3fa80633142f
ww218/2021c2
week03/week03-1.cpp
#include <stdio.h> #include <string.h> char line[2000]; int palindrome() { int N=strlen(line); for(int i=0;i<N;i++) { if(line[i] != line[N-1-i])return 0; } return 1; } int main() { while(scanf("%s",line)==1) { int p=palindrome(); if(p==1)printf("%s -- is a palindrome.\n\n",line); if(p==0)printf("%s -- is...
ALGO
0.998927
3.25968
284cc9d4-5281-418b-ae57-b72fee511003
CrystalParaboy/leetcode
33. 搜索旋转排序数组.cpp
class Solution { public: int search(vector<int>& nums, int target) { int l=0, r=nums.size()-1; while(l<=r){ int mid=(l+r)>>1; if(nums[mid] == target) return mid; if(nums[l] <= nums[mid]){ if(nums[mid] > target && target >= nums[l]) ...
ALGO
0.999956
6.20435
306f4962-3723-4c7c-9796-77983d3b640a
ishandutta2007/codeforces
abc864197532/normal/1586/B.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair <int, int> #define X first #define Y second #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define info() cout << __PRETTY_FUNCTION__ << ": "...
ALGO
0.999972
4.163925
3770b9db-416c-452b-8689-12d4472ee6fd
PriyanshuNamadutt/contest-1029-
1029D.cpp
#include<iostream> #include<vector> using namespace std; bool solve( vector<int> &a ) { int n = a.size(); int r = ( 2*a[0] - a[1]) % (n+1); if ( r != 0 ) return false; else { int y = ( 2*a[0] - a[1])/(n+1); int x = a[0] - n*y; if ( min(x,y) < 0 ) return false; for ( i...
ALGO
0.999594
4.002151
24acadf8-9146-4687-adc4-ee4456afedf4
ishandutta2007/codeforces
oleh1421/normal/1367/D.cpp
//#pragma GCC optimize("O2") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> typedef unsigned long long ll; #define endl '\n' typedef long double ld; //#define double ld using namespace std; const int N=300010; int cnt[30]; int b[N]; int ans[N]; void solve(){ string s;cin>>s; int n;cin>>n; f...
ALGO
0.999915
4.247855
dd3d3026-3d4f-4e09-a620-4808a76718a2
emmTGB/cloudCode
cpp/leetcode/873.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int lenLongestFibSubseq(vector<int>& A) { int n = A.size(); if (n == 0) { return 0; } unordered_map<int, int> intMap; for (int i = 0; i < n; i++) { intMap[A[i]] = i; } vector<vector<int>...
ALGO
0.999873
4.787549
63a564df-0f97-4439-9218-cbc3e77f90cc
MilkClouds/Competitive-Programming
PS-Library/DS/SegTree_tree-in-vector_version.cpp
#include <bits/stdc++.h> using ll = long long; using namespace std; inline ll sum(ll a, ll b){return a + b;} struct SegTree{ public: SegTree() : SegTree(0) {} explicit SegTree(int N): N(N), tree(N * 4, 0) {} explicit SegTree(vector<ll>& v, function<ll(ll, ll)> op_func = sum): SegTree(v.size(), v, op_func)...
ALGO
0.999751
4.548557
a919c3c5-3b48-411b-969c-d23c291a8e5f
elitak/wippien
CxImage/CxImage/ximadsp.cpp
// xImaDsp.cpp : DSP functions /* 07/08/2001 v1.00 - Davide Pizzolato - www.xdp.it * CxImage version 5.99c 17/Oct/2004 */ #include "ximage.h" #include "ximaiter.h" #if CXIMAGE_SUPPORT_DSP //////////////////////////////////////////////////////////////////////////////// /** * Converts the image to B&W. * The Mean...
TOOL
0.90667
5.04314
6d6d0fab-4a36-468c-93b0-6a784dcd092d
msaxena14/HackerRank
Problem Solving/Minimum Absolute Difference in an Array.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'minimumAbsoluteDifference' function below. * * The function is expected to return an INTEGER. * The function accepts INTEGER_ARRAY arr as parameter. ...
ALGO
0.999708
5.447597
7ef3da55-9494-4e59-8711-201e31c4ab1d
UdaySharmaGitHub/DSA-CPP
GFG/School Problems/C_plus_plus_Input_Output.cpp
/* Given two integers A and B. Your task is to return their product. Example 1: Input: A = 1, B = 2 Output: 2 Explanation: Multiplication of 1 and 2 is 2. Example 2: Input: A = 8, B = 7 Output: 56 Explanation: Multiplication of 8 and 7 is 56. Your Task: You don't need to read input or print anything. Your task is to c...
ALGO
0.999761
6.048398
018ffab4-f645-4cf9-a88b-8c19427872a8
0juuni/Information-science_portfolio
1. 배열 과제 01.cpp
#include<stdio.h> #include<stack> using namespace std; int main(void) { int n, i, num; stack<int> stk; scanf("%d", &n); for(i=1;i<=n;i++) { scanf("%d", &num); stk.push(num); } for(i=1;i<=n;i++) { printf("%d\n", stk.top()); stk.pop(); } return 0; }
ALGO
0.999707
3.390843
e7a6b814-832d-4d2c-a3d2-cec2834d5752
sarkarchandan/myStudyOnDataStructureAlgorithm
algorithmSort/algorithm_QuickSortImplementation.cpp
#include <iostream> using namespace std; //Paritions the input array for sorting int quickPartition(int *myArray,int start,int end){ int pivot = myArray[end]; int partitionIndex = start; for(int i=start;i<end;i++){ if(myArray[i] <= pivot){ swap(myArray[i],myArray[partitionIndex]); partitionIndex = partit...
ALGO
0.999997
5.719394
286e5f7b-3fb2-44f7-b2e1-ec553903e9a4
ldorelli/icpc
Codeforces/100812_gym/b.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5010; string in[N]; int cnt (string& x) { int res = 0; for (int i = 0; i < x.size(); ++i) { if (x[i] == '1') res++; if (res > 15) return res; } return res; } int main (void) { ios::sync_with_stdio(false); int n, m; ...
ALGO
0.99998
4.654468
0f029e85-4e48-413a-839f-d9308b2849de
jweber94/udemy_softwarepattern_cpp
chain_of_responsability/pointer_cor/pointer_cor.cpp
#include <iostream> struct Creature { std::string _name; int _attack; int _defence; Creature(const std::string& name, int attack, int defence) : _name(name), _attack(attack), _defence(defence) {} friend std::ostream& operator<<(std::ostream& os, const Creature& creature) { os << "name = " << creature....
TOOL
0.970155
5.91203
16d3677e-cf60-404d-9bb4-563aaad4d796
bhuvneshuchiha/DSA
factorial.cpp
#include <iostream> using namespace std; int factorial(int num) { // base case if (num == 1 || num == 0) { return 1; } return num * factorial(num - 1); } int main(int argc, char *argv[]) { int num; cin >> num; int result = factorial(num); cout << result << endl; return 0; }
ALGO
0.999955
5.786729
19668c55-c0af-42c2-9549-7f338c538bbc
SanthanCH/Competitive-Programming
Binary_Tree_Postorder_Traversal/Binary_Tree_Postorder_Traversal_iter.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.999904
6.259153
5e242a09-c316-4537-82f0-d37cf222444d
kapil4457/STL
sort.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a[4] = {5, 4, 1, 2}; sort(a, a + 4); for (auto i : a) { cout << i << " "; } vector<int> v1 = {5, 4, 1, 2}; sort(v1.begin(), v1.end()); for (auto i : v1) { cout << i << " "; } return 0; }
ALGO
0.999618
3.729308
96db00f8-b1cf-4f36-a2ac-d505be53ac24
HeonSeok98/CPP
cpp08/ex01/Span.cpp
#include "Span.hpp" Span::Span() : N(0) {} Span::Span(unsigned int N) : N(N) {} Span::Span(const Span& other) { this->N = other.N; this->data = other.data; } Span& Span::operator=(const Span& other) { if (this != &other) { this->N = other.N; this->data = other.data; } return *this; } Span::~Span() {} vo...
ALGO
0.989571
4.912379
0e308fd1-0239-4987-917e-82a79e156a83
vmware-archive/quickstep
types/operations/binary_operations/SubtractBinaryOperation.cpp
#include "types/operations/binary_operations/SubtractBinaryOperation.hpp" #include <string> #include <utility> #include "types/DateOperatorOverloads.hpp" #include "types/DatetimeLit.hpp" #include "types/DatetimeIntervalType.hpp" #include "types/DatetimeType.hpp" #include "types/IntervalLit.hpp" #include "types/Type.h...
TOOL
0.936586
7.88952
5f714f67-dab4-440e-8da0-8799199b0b3a
CodeXGaurav/CSA_2018
Cache_simulator_2/Cache_simulator_2/src/Cache_simulator_2.cpp
/* Cache Simulator Level one L1 and level two L2 cache parameters are read from file (block size, line per set and set per cache). The 32 bit address is divided into tag bits (t), set index bits (s) and block offset bits (b) s = log2(#sets) b = log2(block size) t=32-s-b */ /* In the programs seen in previous chapte...
TOOL
0.942195
3.070067
68b6716b-5342-47e1-91d4-55b6b6009de4
RodReBer/obligatorio_algoritmos_2
ejercicio4.cpp
#include <cassert> #include <string> #include <iostream> #include <limits> #include "tads/Ejercicio4.cpp" using namespace std; int main() { int cantPedidos, cantOp; cin >> cantPedidos; cin >> cantOp; ColaPrioridad *cola = new ColaPrioridad(cantPedidos); for (int i = 0; i < cantOp; i++) { ...
TOOL
0.978901
4.968596
46bb25c5-6b7c-47d5-b6ae-66bb2444b281
taatzz/LeetCode
2576.求出最多标记下标.cpp
/* * @lc app=leetcode.cn id=2576 lang=cpp * * [2576] 求出最多标记下标 */ // @lc code=start #include <vector> #include <algorithm> using namespace std; // class Solution { // public: // // 二分答案 // bool check(vector<int>& nums, int k) // { // int n = nums.size(); // int res = 0; // for(...
ALGO
0.999943
5.85667
32fefb81-282b-4961-9949-99a4518865f4
agakshay304/Learning_cpp
Stack/Postifix.cpp
#include <iostream> #include <math.h> #include <stack> using namespace std; int postifix(string st) { stack<int> s; //Because we go from L to R in postifix. for(int i=0;i<st.length();i++) { if(st[i]>='0' && st[i]<='9') { s.push(st[i]-'0'); //converts string to i...
ALGO
0.999759
3.907117
84fee817-f577-4510-84b9-3c7c811914e7
ishandutta2007/codeforces
ei133333/normal/1557/C.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.999914
5.048304
e1aa2612-fe8e-4bfd-b10a-2915ded58200
Emily2839/game
combat/combat.cpp
// // Created by Victor Navarro on 19/02/24. // #include "Combat.h" #include <iostream> #include <algorithm> using namespace std; bool compareSpeed(Character *a, Character *b) { return a->getSpeed() > b->getSpeed(); } // CONSTRUCTORES -- INICIA Combat::Combat(vector<Character *> _participants) { participants...
ALGO
0.942441
4.410686
bee08b24-c8a0-4c29-9dfe-6da1121f52e4
zhuqiweigit/leetcode
code/210.cpp
#include <iostream> #include <vector> #include <limits> #include <queue> #include <map> #include <stack> #include <sstream> #include <unordered_map> using namespace std; class Solution { public: bool valid = true; vector<int> ans; bool findOrder(int numCourses, vector<vector<int>>& prerequisites) { ...
ALGO
0.999991
5.874074
1f3968e6-2e08-4633-9a30-a828fd1ede38
masonarchhsieh/Training_LeetC
fibonacci-number/Accepted/10-27-2020, 6_17_57 PM/Solution.cpp
// https://leetcode.com/problems/fibonacci-number class Solution { public: int fib(int N) { if (N < 2) return N; return fib(N-1) + fib(N-2); } };
ALGO
0.999993
6.711161
174fa685-e95b-4ed4-94ec-9c6686dba6ad
ujjwal0020/CODECHEF
SPICE LEVEL.CPP
#include <iostream> using namespace std; int main() { int t; cin>>t; for(int i=0;i<t;i++) { int a; cin>>a; if(a>=4&&a<7) cout<<"medium"<<endl; else if(a>=7) cout<<"hot"<<endl; else cout<<"mild"<<endl; } return 0; }
ALGO
0.998466
3.659102
134182c9-557f-4d2c-b1de-c279b9d338a0
ankushsingh24/LeetCode
1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp
class Solution { public: int shipWithinDays(vector<int>& weights, int days) { int left = 0, right = 0; for(auto w: weights) { left = max(left, w); right += w; } while(left < right) { int mid = left + (right - left) / 2...
ALGO
0.99999
5.832547
bc31902c-5810-4286-a696-8df0a2308079
ashmin-yoon/baekjoon
1699.cpp
#include <iostream> #include <cmath> using namespace std; const int MAX_SIZE = 100001; const int INF = 987654321; int N; int dp[MAX_SIZE]; int main() { cin >> N; dp[0] = 0; dp[1] = 1; int selected = 1; for (int i = 2; i < MAX_SIZE; ++i) { dp[i] = INF; selected = 1; if((int)sqrt(i) * (int)sqrt(i) == i) ...
ALGO
0.999897
3.927498
64ac3fb0-4dc9-4d56-9433-c9f8ddd5a67c
rishi12jn/c-codes
pattern3.cpp
#include <iostream> using namespace std; int main(){ int n; cin>>n; int i=1; while(i<=n){ int j=1; while(j<=n){ cout<<j; j++; } cout<<endl; i++; } }
ALGO
0.999954
3.799635
9895f5d0-d307-42ff-8cb8-eb0d8bb6fbe9
mizolotu/tinyml_experiments
sketches/sense/anomaly_detection_test/Clstrm.cpp
/* * Clstrm.cpp * * Created on: Jun 6, 2023 * Author: mizolotu */ #include "Clstrm.h" #include <math.h> #include "utils.h" //#include <iostream> Clstrm::Clstrm() { n = new float[n_microclusters]; ls = new float[n_microclusters * input_dim]; ss = new float[n_microclusters * input_dim]; for (short i=0...
ALGO
0.996685
5.372035
aec55553-0950-4bc4-9460-f349d4956a13
sameer91/LeetcodeSolutions
archive/minHeap.cpp
#include<iostream> #include<cstring> using namespace std; void heapify(int arr[],int x,int N){ int largest=x; int l=2*x+1; int r=2*x+2; if(l<N && arr[l]>arr[largest]) largest=l; if(r<N && arr[r]>arr[largest]) largest=r; if(x!=largest){ swap(arr[x],arr[largest]); heapify(arr,largest,N); }...
ALGO
0.999961
4.748409
e554bbe7-5dc0-4ef0-b2d5-c48033fe7bb9
tanyasharma6317/data-structures-questions
greatforests.cpp
#include<bits/stdc++.h> using namespace std; int count=0; int N; char mtr[1000][1000]; void count_adj(int i,int j) { if(i<0 || j<0 || i>N || j>N) return ; if(mtr[i][j]=='T') { mtr[i][j]='W'; ::count++; count_adj(i-1,j); count_adj(i+1,j); count_adj(i,j+1); ...
ALGO
0.999358
4.9059
2cd658a9-fcbc-4c32-9e2f-63d129ce51e6
rk173238/leetcode-hard
All O`one Data Structure.cpp
class AllOne { public: unordered_map<string,int> mp; priority_queue<pair<int,string>> mx; priority_queue<pair<int,string>,vector<pair<int,string>>,greater<pair<int,string>>> mn; AllOne() { } void inc(string s) { mp[s]++; if(!mx.empty() && mx.top().second == s) mx.p...
ALGO
0.999946
6.274014
f71b7a63-8b2f-4803-9f33-47c6860cffd8
2headpepe/studiyng
hw/bmp.md/2.cpp
//поворотик void rotation(int rotate = 90,const char* inpic = "NOHOMO.bmp", const char* outpic = "Rotated_pic.bmp")//Sarmat<3 { RgbImg img = readRgbImg(inpic); if (rotate % 90 != 0) { std::cout << "Wrong angle!\n"; } else { rotate %= 360; if (rotate == 90) { RgbImg new_img = createRgbImg(img.width, img...
ALGO
0.941316
3.930128
79909fca-f285-49d6-9bea-84db1f5d40e7
ishandutta2007/codeforces
hyperbolic/normal/1625/E1.cpp
#include <stdio.h> #include <vector> char x[300010]; int sum[300010]; std::pair<int, long long int> next[300010][21]; int main() { int a,b; scanf("%d%d",&a,&b); scanf("%s",x+1); for(int i=1;i<=a;i++) { if(x[i]=='(') sum[i] = sum[i-1] + 1; else sum[i] = sum[i-1]-1; } next[a][0] = std::make_pair(a,0); nex...
ALGO
0.99988
3.722346
806ea326-895f-4620-95a0-8253c25755e0
aayushjalan18/6Companies30Days
Goldman Sachs/Question_13.cpp
#include <bits/stdc++.h> using namespace std; string solve(string s) { int temp = 0; string ans = ""; stack<pair<string,int>> st; for(int i=0; i<(int)s.length(); i++) { if(s[i] >= 'a' && s[i] <= 'z') ans.push_back(s[i]); else if(s[i] >= '0' && s[i] <= '9') ...
ALGO
0.999119
5.754412
3d12a1a1-b81e-41b3-a739-6fd5dff35aa6
caddyless/parallel
main.cpp
#include <iostream> #include<stdlib.h> #include<stdio.h> #include<omp.h> #include <ctime> #define N 1000000000 int main(int argc,char** argv) { using std::cout; using std::cin; using std::endl; long long int num_in_cycle=0; clock_t start_time,end_time; int thread_count; thread_count=strtol...
ALGO
0.999774
3.698682
1988eedb-1d77-4f1b-990d-37513b01fe1c
vovchic17/Algorithms
task4/solution.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <string> #include <Windows.h> class Tree { private: struct Node { std::string word; int freq = 1; Node* left = nullptr; Node* right = nullptr; }; Node* root; Node* insert(Node* node, const std::string& word) { if (!n...
TOOL
0.998073
5.080977
4c7b2b43-3b50-4009-a1d7-592e4bbdbeff
showmanlee/HowCanISolveThisQuestion
BOJ/2000/2018.cpp
// 수들의 합 5 // https://www.acmicpc.net/problem/2018 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void) { cin.tie(NULL); ios_base::sync_with_stdio(false); int n; cin >> n; int res = 0; int l = 1, r = 1; int sum = 1; while (l <= n) { if (s...
ALGO
0.999966
4.892158
c5650449-e9d6-46b9-a807-29524a30ad67
Subzero-10/leetcode
.history/127.word-ladder_20200903201338.cpp
/* * @lc app=leetcode id=127 lang=cpp * * [127] Word Ladder */ // @lc code=start class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { } }; // @lc code=end
ALGO
0.999928
6.185126
13610dc6-22de-4604-bc24-3e7fa3789011
AlexanderShkurko1/laba2
Laba22/Laba22/Laba22.cpp
#include <stdio.h> #include <iostream> using namespace std; int main() { setlocale(LC_ALL, "RUS"); int arr[30][30]; //Объявление переменных int n, p = 1; cout << "Введите n: "; cin >> n; //Ввод размера матрицы for (int i = 0; i < n; i+...
ALGO
0.999752
3.386488
036b9aba-0f09-4117-b1e7-72a878604ee1
MaoMao0414/NTHUCS_VLSIPDA_2023
Homework 4/src/Example.cpp
#include "ExampleFunction.h" #include "NumericalOptimizer.h" #include <iostream> using namespace std; ExampleFunction::ExampleFunction() { } void ExampleFunction::evaluateFG(const vector<double> &x, double &f, vector<double> &g) { // minimize 3*x^2 + 2*x*y + 2*y^2 + 7 f = 3 * x[0] * x[0] + 2 * x[0...
ALGO
0.999938
5.873583
f788d79d-c040-4c66-9534-94c848b40a1c
pkbhowmick/LightOJ
Loj 1144 - Ray Gun.cpp
#include <bits/stdc++.h> #define pb push_back #define sc1(n) scanf("%lld",&n) #define sc2(a,b) scanf("%lld%lld",&a,&b) #define sc3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c) #define MX 100000 using namespace std; typedef long long int ll; typedef unsigned long long ul; bool prime[1000006]; ll mob[1000006]; void seive() {...
ALGO
0.999844
4.8344
6d209130-ea6c-4480-9866-fcb37ad8de33
jakolsz11/Polski_spoj
Łatwe/41. Niekolejne/dousuniecia.cpp
#include <iostream> using namespace std; int main() { int liczba; cin>>liczba; if (liczba <= 2) { if (liczba == 0) { cout<<"0\n"; } else { cout<<"NIE\n"; } } else if (liczba % 2 != 0 && liczba > 2) // liczba nieparzysta i...
ALGO
0.999878
3.85598