Hanging Posters

Sort by

recency

|

54 Discussions

|

  • + 0 comments

    What is going on? Included <numeric> and using C++20...

    error: ‘transform_reduce’ was not declared in this scope

  • + 0 comments
    from math import *
    n,h=list(map(int,input().split()))
    w=list(map(int,input().split()))
    l=list(map(int,input().split()))
    maxi=0
    for i in range(n):
        hei=ceil(max(0,(w[i]-l[i])+0.75*l[i]-h))
        if hei>maxi:
            maxi=hei
    print(maxi)
    
  • + 0 comments

    what the heel is this ,, in dev cpp its works,, but dont know what happen to this ide ,,,,
    any help plese

    Reading symbols from Solution...done. [New LWP 9193] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./Solution'. Program terminated with signal SIGSEGV, Segmentation fault.

    0 main () at Solution.cpp:9

    9 cin>>i>>height; To enable execution of this file add add-auto-load-safe-path /usr/local/lib64/libstdc++.so.6.0.25-gdb.py line to your configuration file "//.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "//.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path"

  • [deleted]
    + 0 comments
    /*
    	By: harshvcode | harshvsingh.223@gmail.com
    	Created at: 03:46:09_PM_21-JUNE-2020
    */
    #include <bits/stdc++.h>
    #define LL long long
    #define M 1000000009
    #define NL '\n';
    #define PB push_back
    #define Ai vector<int> arr
    using namespace std;
    int main()
    {
    	ios::sync_with_stdio(0);
      	cin.tie(0);
    	int n,h;
    	cin >> n >> h;
    	int ans=0;
    	Ai(n),len(n);
    	for(int i=0; i<n ;i++) cin >> arr[i];
    	for(int i=0; i<n; i++) cin >> len[i];
    	for(int i=0; i<n; i++){
    		int checker=arr[i] - h;
    		if(checker < 1) continue;
    		ans=max(ans,(checker - (len[i] / 4)));
    	}
    	cout << ans << NL;
    	return 0;
    }
    
  • + 0 comments

    Here's my code.Since I'm just a beginner so my coding style is quite simple and I'm working on my coding skills.So can anyone plz tell me which contest for beginners should I participate in to hone my skills.

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n,h,i,res=0,temp;
        cin>>n>>h;
        int wall[n],poster[n];
        for(i=0;i<n;i++)
        cin>>wall[i];
        for(i=0;i<n;i++)
        {
            cin>>poster[i];
            temp=wall[i]-poster[i]/4;
            if(res<temp)
            res=temp;
        }
        if(res>h)
        cout<<res-h;
        else
        cout<<"0";
        return 0;
    }