topic
Title link
Problem-solving ideas
There is a spj code in the background, which can verify the output data of students and pass if it meets the conditions.
Attached with spj code
#include <iostream>
#include <fstream>
#include <string>
#include <cctype>
#include <algorithm>
using namespace std;
int main(void)
{
ifstream in,out,user_out;
("input");
("output");
user_out.open("user_output");
string s,t;
if(!(user_out>>s))
return 1;
out>>t;
if(()>5)
return 1;
transform((),(),(),::toupper);
transform((),(),(),::toupper);
if(s!=t)
return 1;
if(user_out>>s)
return 1;
return 0;
}
Code
#include <iostream>
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
(0);
int n;
cin>>n;
if(n%2==1)
cout<<"YES";
else
cout<<"NO";
return 0;
}
import ;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner();
int n=();
if(n%2==1)
("YES");
else
("NO");
}
}
n=int(input())
print('YES' if n%2==1 else 'NO')
Algorithm and complexity
- Algorithm: None.
- Time complexity:\(\mathcal{O}(1)\) 。
- Space complexity:\(\mathcal{O}(1)\) 。
Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO.
Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO.
Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO.
Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO.
Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO. Niuke's question answer | Single group_spj judges YES and NO.