QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#506870#504. Chessboardhahmadli0 0ms3492kbC++141.5kb2024-08-06 00:11:402024-08-06 00:11:41

Judging History

你现在查看的是最新测评结果

  • [2024-08-06 00:11:41]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:3492kb
  • [2024-08-06 00:11:40]
  • 提交

answer

#pragma GCC optimize("03")
#include <bits/stdc++.h>

using namespace std;

#define int long long

const int sz=2e5+5;
const int INF=1e9;

void solve()
{    
    int n,k;
    
    k=0;
    
    cin>>n>>k;
    
    //for(n=2;n<=100;n++)
    //{
        int s=n*n;
        
        char arr[n][n];
        
        if(!k)
        {
            for(int i=0;i<n;i++)
                for(int j=0;j<n;j++)
                    arr[i][j]='W';
            
            vector<int> divisors;
            
            for(int i=1;i<=n;i++)
                if(n%i==0)
                    divisors.push_back(i);
            
            int ans=INF;
            
            for(int i=0;i<divisors.size();i++)  
            {
                int lcl_ans;
                    
                if(divisors[i]<=(n/2))
                {
                    int lcl=divisors[i]*divisors[i];
                    
                    int k=s/lcl;
                    
                    lcl_ans=k/2;
                    
                    lcl_ans*=lcl;
                }
                    
                ans=min(ans,lcl_ans);
            }
            
            cout<<ans<<endl;
        }
    //}
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    
    //freopen("cowtip.in","r",stdin);
    
    //freopen("cowtip.out","w",stdout);
    
    int t=1;
    
    //cin>>t;
    
    while(t--)
    {
        solve();
    }
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3492kb

input:

100 0

output:

0

result:

wrong answer 1st lines differ - expected: '4800', found: '0'

Subtask #2:

score: 0
Memory Limit Exceeded

Test #8:

score: 0
Memory Limit Exceeded

input:

62119 62603
12553 17025 12553 17025
6889 49271 6889 49271
22523 10778 22523 10778
27058 28538 27058 28538
39696 26638 39696 26638
59348 52344 59348 52344
53272 14810 53272 14810
29522 5148 29522 5148
52527 55935 52527 55935
43346 19863 43346 19863
49934 33407 49934 33407
57492 27016 57492 27016
7355...

output:


result:


Subtask #3:

score: 0
Wrong Answer

Test #18:

score: 0
Wrong Answer
time: 0ms
memory: 3484kb

input:

78 280
55 71 55 71
22 73 22 73
60 30 60 30
28 11 28 11
51 39 51 39
21 33 21 33
25 32 25 32
42 54 42 54
62 71 62 71
23 31 23 31
75 1 75 1
56 76 56 76
33 9 33 9
9 76 9 76
77 67 77 67
68 21 68 21
62 24 62 24
32 70 32 70
41 2 41 2
58 58 58 58
65 14 65 14
66 72 66 72
72 21 72 21
71 63 71 63
13 18 13 18
6...

output:


result:

wrong answer 1st lines differ - expected: '2732', found: ''

Subtask #4:

score: 0
Skipped

Dependency #2:

0%

Subtask #5:

score: 0
Memory Limit Exceeded

Test #48:

score: 0
Memory Limit Exceeded

input:

99774 82706
29912 70150 29912 70150
93471 873 93471 873
64978 14740 64978 14740
57016 16856 57016 16856
93392 19170 93392 19170
28713 63187 28713 63187
65553 40025 65553 40025
97816 38346 97816 38346
4184 36771 4184 36771
63515 21172 63515 21172
39860 95092 39860 95092
62818 96699 62818 96699
74942 ...

output:


result:


Subtask #6:

score: 0
Skipped

Dependency #1:

0%